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 thr
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, Octob
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
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 di
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?
Thank you for any assistance,
- J
5 matches
Mail list logo