Suppose I have the following:
$string = "(a) (b) (c)";
How would I explode to get the contents inside the parenthesis. If the contents of the string were separated by only one character instead of 2, I would use:
$string = "a-b-c";
explode("-", $string);
But how to do it when 2 separators are used to encapsulate items that need to be exploded?
source
share