Re: Splitting a string by a ,

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux