Log in

View Full Version : show only part of mysql row



queerfm
04-01-2008, 10:11 AM
Hi i would like to show only 60 characters of the {$row['about']} as i would like to make a cut down version of there profile and if people want to see more they click on the more link.

I have tryed the following,
{$row.about|stripslashes|nl2br|wordwrap:60:"<br />":true}

however i don't think i am doing it right.

If any one can point me in the right direction that would be great.

THX

Nile
04-01-2008, 11:54 AM
I believe that either the substr function or strpos function can help.

JazzcatCB
04-01-2008, 10:35 PM
Try this:


echo substr($row['about'], 0, 60);