GFX.Wiz
October 27th, 2004, 11:26 AM
This one should be easy for anyone other than me...I couldn't find any documentation on the 'net for this...
When I query the database I get my results. One of the results is a headline that can be up to 255 characters in the database. However, in some instances I only have enough room to display the first 35 characters. How can I truncate the output followed by a "..." if it's longer than 35 characters?
example:
- in DB: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Mauris ipsum justo, fermentum ornare, pulvinar vel, ultrices ut, turpis."
- required output: "Lorem ipsum dolor sit amet, consect..."
Thanks for any input!
peace,
GFX.Wiz
When I query the database I get my results. One of the results is a headline that can be up to 255 characters in the database. However, in some instances I only have enough room to display the first 35 characters. How can I truncate the output followed by a "..." if it's longer than 35 characters?
example:
- in DB: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Mauris ipsum justo, fermentum ornare, pulvinar vel, ultrices ut, turpis."
- required output: "Lorem ipsum dolor sit amet, consect..."
Thanks for any input!
peace,
GFX.Wiz