I am trying to explode() with multiple delimiters.
With the delimiters:
- "&"
- " and "
- "/"
- ","
So that, for example if I have this array:
<?php
$lol = array(
"Strawberry/Blueberry/Raspberry",
"Strawberry, Blueberry, Raspberry",
"Strawberry & Blueberry & Raspberry",
"Strawberry and Blueberry and Raspberry",
"Strawberry, Blueberry and Raspberry",
"Strawberry, Blueberry, Raspberry",
);
?>
It would output this:
<?php
$lol = array(
array("Strawberry","Blueberry","Raspberry"),
array("Strawberry","Blueberry","Raspberry"),
array("Strawberry","Blueberry","Raspberry"),
array("Strawberry","Blueberry","Raspberry"),
array("Strawberry","Blueberry","Raspberry"),
array("Strawberry","Blueberry","Raspberry"),
);
?>
Is there an efficient way to do this?