substr($str, 0, 200);
or an (untested) ereg
ereg((.{200}[^ ]*), $str, $bits);
HTH
Martin
-Original Message-
From: Jason Williard [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 29 October 2003 1:53 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Shortening a String
I would like to display part of
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
Thanks. That's exactly what I was looking for and is working perfectly.
- Jason
-Original Message-
From: Pablo Gosse [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 28, 2003 7:18 PM
To: Jason Williard; [EMAIL PROTECTED]
Subject: RE: [PHP] Shortening a String
On Tuesday, October 28
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?
Read this
4 matches
Mail list logo