note 17715 deleted from function.split by jimw
| From: | jimw@php.net | Date: | Fri, 21 Dec 2001 00:23:09 +0000 |
| Subject: | note 17715 deleted from function.split by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-23619@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
?>