I run preg_match_all()
like this:
preg_match_all($regex, $text, $array);
And it creates a multidimensional array like this:
$array = array(
array(1, 2...)
);
But I want it to create a simple indexed array like:
$array = array(1, 2...);
preg_match()
adds an indexed array, but somehow preg_match_all()
has lost the very little that remained of its mind. Why? And what's the solution?