note 17715 added to function.split

From: Date: Thu, 20 Dec 2001 20:53:59 +0000
Subject: note 17715 added to function.split
Groups: php.notes 
Request: Send a blank email to php-notes+get-23407@lists.php.net to get a copy of this message
For that example to work, you have to drop the array() function, since the split() function already returns an array. This works: <? $keyword = "this is a test"; $k = split(" ", $keyword); for($i=0; $i<count($k); $i++) { echo "$k[$i]\n"; } //Output: //this //is //a //test ?> -- http://www.php.net/manual/en/function.split.php http://master.php.net/manage/user-notes.php?action=edit+17715 http://master.php.net/manage/user-notes.php?action=delete+17715 http://master.php.net/manage/user-notes.php?action=reject+17715

« previous php.notes (#23407) next »