note 25866 deleted from function.substr by didou
| From: | didou@php.net | Date: | Sun, 10 Aug 2003 21:36:17 +0000 |
| Subject: | note 25866 deleted from function.substr by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-53830@lists.php.net to get a copy of this message | ||
Note Submitter: howard at freetimers (dotcom)
----
in response to the getting x number of words, you could explode($str," ") to split a
string into an array of words
eg:
$bah = explode(" ", "hello i am bob");
for($i=0 ; $i<strlen($bah) ; $i++)
{
echo "[$bah[$i]]<br />";
}
returns:
[hello]
[i]
[am]
[bob]
[]