preg_match_all into simple array
问题 I have preg_match_all function: preg_match_all('#<h2>(.*?)</h2>#is', $source, $output, PREG_SET_ORDER); It's working as intended, BUT the problem is, it preg_matches all items twice and into a huge multi dimensional array like this for example where it, as intended, preg_matched all 11 items needed, but twice and into a multidimensional array: Array ( [0] => Array ( [0] => <h2>10. <em>Cruel</em> by St. Vincent</h2> [1] => 10. <em>Cruel</em> by St. Vincent ) [1] => Array ( [0] => <h2>9. <em