i could not figure out how to truncate a string in php.
anyone is so kind to help me?
Sure, use substr() function which is mentioned in the string functions of the manual:
http://www.phpbuilder.com/manual/