note 104614 deleted from function.substr by danbrown

From: Date: Sun, 26 Jun 2011 15:58:50 +0000
Subject: note 104614 deleted from function.substr by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-180961@lists.php.net to get a copy of this message
Note Submitter: alex dot audu at garlandnetworx dot com ---- I used the following to return the first word in a string of words up to the first occurence of a delimiter character. $firstWord = substr($wString, 0, -strlen($wString, $delimiter); For example: for $wString = "This is great"; $delimiter = " "; Then $firstWord = "This" Cheers. Alex.

« previous php.notes (#180961) next »