Re: Splitting a string by a ,

From: Date: Fri, 05 Dec 2003 10:02:29 +0000
Subject: Re: Splitting a string by a ,
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-31908@lists.php.net to get a copy of this message
I'm trying to split a string into an Array by a , but I kepe getting errors. Looking at the PHP manual, I thought it would be this way:
$keywords = preg_split(",", $email);
Hi, if you just want to split a "a,b" to array("a","b") you can use explode wich would wourd as you wrote above. $keywords = explode(",", $email); Best regards, Karsten Eichentopf

« previous php.db (#31908) next »