note 19600 added to function.substr

From: Date: Tue, 05 Mar 2002 13:12:53 +0000
Subject: note 19600 added to function.substr
Groups: php.notes 
Request: Send a blank email to php-notes+get-27355@lists.php.net to get a copy of this message
In response to the person needing a substr_index function to return the 1st x words in a string, why not just explode the string using a space as the string separator? The first x words are now the first x entries in the returned array. -- http://www.php.net/manual/en/function.substr.php http://master.php.net/manage/user-notes.php?action=edit+19600 http://master.php.net/manage/user-notes.php?action=delete+19600 http://master.php.net/manage/user-notes.php?action=reject+19600

« previous php.notes (#27355) next »