note 26291 added to function.substr
| From: | ompl at nm dot ru | Date: | Fri, 25 Oct 2002 07:42:35 +0000 |
| Subject: | note 26291 added to function.substr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-38532@lists.php.net to get a copy of this message | ||
About strings and spaces
// $data - my string
$lim=160; // limit of chars in message
$text = split(" ",$data);
$i=0;
$add_str="";
while($i<=count($text)) {
$add_str.=$text[$i]." ";
if(strlen($tt)<=$lim) { $out=$add_str; }
else { echo $out; $add_str=""; }
$i++;
}
--
http://www.php.net/manual/en/function.substr.php
http://master.php.net/manage/user-notes.php?action=edit+26291
http://master.php.net/manage/user-notes.php?action=delete+26291
http://master.php.net/manage/user-notes.php?action=reject+26291