I want to parse string in php with multiple delimiters I use this code
$pattern = '/[, ]/';
$array = preg_split( $pattern, $string);
This work fine , but I want to use and "[" and "]" as delimiters!!
How can I include this delimiters in $pattern. I try with $pattern = '/[, []]/';
and $pattern = '/[, ]/';
but error occurred.
Thanks