You can use the substr function:

$myoutput = "This is my sample output.";

$myoutput = substr($myoutput,0,10)."...";



From: "Michael P. Carel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: [PHP] limiting characters
Date: Wed, 19 Feb 2003 07:00:52 +0800

Hi to all,

How could i limit the character output that is being displayed in the html
page. Is there a function or a php classes that perfectly support it?

Example:

$myoutput = "This is my sample output.";

Required Output:

This is my ....

Any idea? Thanks in advance for the replies



mike



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

_________________________________________________________________



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to