Try this:
if(strlen($row->text)>50) {
echo substr($row->text,0,47) . "...";
} else {
echo $row->text;
}
- Audun
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 05, 2003 3:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Limit output of query field
Hi there,
Hope you can help me with the following:
I have a query and i'm showing the output:
echo $row->text;
That goes o.k. but the text is 400 characters long and I only one to
show the first 50 characters and at the end showing ... dot's..
Help!
Thank you very much!
Frank
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php