I now split the sting op , only like this:
$a_string = preg_split('/[,]/', $sting);
I also want to split the sting on " and " but i can't find the right regex.
I now split the sting op , only like this:
$a_string = preg_split('/[,]/', $sting);
I also want to split the sting on " and " but i can't find the right regex.
You can also just do:
$arr = preg_split('/,| and /', $str);
as |
(alteration) has a very low precedence and binds last.