Use preg_split to split a string on "," and " and "

Posted by RvZ on Stack Overflow See other posts from Stack Overflow or by RvZ
Published on 2010-03-18T10:33:39Z Indexed on 2010/03/18 10:41 UTC
Read the original article Hit count: 275

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about php

Related posts about regex