Possible Duplicate:
Shorten String in PHP (full words only)
Below substr which iam using . Which echo first 38 characters from my database. This code breaking the word which is at end .
<?php echo substr(ucfirst($row['metadesc']),0,38); ?>...
which output like this.
news for today was null try tomo
how to stop the string after 38 characters after the end of word.
output should be like this
news for today was null try tomorrow