Thanks for the reply chris, altho that was what I had already. Guess it's
down to me measuring chars myself then :-(
- Original Message -
From: "Chris Lee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 13, 2001 10:28 PM
Subject: [PHP] Re: cro
function truncate($string, $size)
{
$new_string = substr($string, 0, $size);
$new_string = explode(' ', $new_string);
array_pop($new_string);
$new_string = implode(' ', $new_string);
return $new_string;
}
this function can defn be improved apon. all this does is trims the string
t
2 matches
Mail list logo