On Tuesday, October 28, 2003 6:53 PM Jason Williard wrote:

> I would like to display part of the output of a query.  In many cases,
> the string returned by this query exceeds 200 characters.  Is there a
> way to cut it off after 200 characters?  Even better, is there a way
to
> cut it off at the next space after 200 characters?

This should do what you want.
 
substr($str,0,strpos($str,' ',200));

Cheers,
Pablo

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

Reply via email to