note 26290 added to function.substr

From: Date: Fri, 25 Oct 2002 07:41:50 +0000
Subject: note 26290 added to function.substr
Groups: php.notes 
Request: Send a blank email to php-notes+get-38531@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+26290 http://master.php.net/manage/user-notes.php?action=delete+26290 http://master.php.net/manage/user-notes.php?action=reject+26290

« previous php.notes (#38531) next »