i want to convert string into array when comma or semicolon is encountered.
for example a string a , b ; c , d ; e will be converted into
[0] = a
[1] = b
[2] = c
[3] = d
[4] = e
i tried using explode and that works fine so far but i am able to specify only
one deliminator like explode(",",$str) while i want to use two deliminators. i.e.
comma and semicolon.
i don’t know if it is possible to specify a pattern in explode function as a first parameter.
Use
preg_split: