Php multiple delimiters in explode
You can take the first string, replace all the @
with vs
using str_replace
, then explode on vs
or vice versa.
Try about using:
$output = preg_split('/ (@|vs) /', $input);
You can take the first string, replace all the @
with vs
using str_replace
, then explode on vs
or vice versa.
Try about using:
$output = preg_split('/ (@|vs) /', $input);