Jump to content

Archived

This topic is now archived and is closed to further replies.

redarrow

Text amount please help.

Recommended Posts

Advance thank you.

I use this php statement to get a br afther 63 charecter thats fine can someone also kindly help me to incorprate to show only 200 charecters.

I tried but faild please help cheers.

$comment=$data['comment'];
$comment=wordwrap($comment,63,"<br>",1);

example

$num_chars = 19;

$description = $description." ";

$description = substr($description,0,$num_chars);

$description = substr($description,0,strrpos($description,' '));

echo $description;


doesnt work please help cheers.

Share this post


Link to post
Share on other sites
substr() ?

[b]EDIT:[/b] Beaten to it!

Share this post


Link to post
Share on other sites
that worked brillent cheers so happy all night on that cheers.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.