Forum Moderators: coopster
im relatively new to php & have no idea how to trim dynamic text pulled from a db. im building a news section on a site & only want a small snippet of the news item to be displayed and then '... more' link which would link to the detail page.
this was discussed in the .net/asp forum at
[webmasterworld.com...]
which is exactly want i want to achieve, just in the wrong language.
thnx 4 your help.
$text = "This is a very long piece of text";
print(substr($text, 0, 10) . '... more');
Will output
This is a ... more