note 11456 added to explode

From: Date: Wed, 21 Feb 2001 15:45:38 +0000
Subject: note 11456 added to explode
Groups: php.notes 
Request: Send a blank email to php-notes+get-11358@lists.php.net to get a copy of this message
Thanks to others contributions I was able to easily separate my keywords for search I made a slight adjustment to paul@netkick.com 's function (23-Jan-2000 11:51)so that it would avoid the problem noted by boris@alum.mit.edu(15-Mar-1999 12:03) function getKeywordsArray($keywords){ //replace the whitespace with a comma $keywords = ereg_replace(" ",",",$keywords); while (ereg(",,", $keywords)){ $keywords = ereg_replace(",,",",",$keywords); } $seperated = explode(",",$keywords); return $seperated; } http://www.php.net/manual/en/function.explode.php

« previous php.notes (#11358) next »