<h1>Heading 1</h1>
<h2>Heading 2</h2>
<p>Content</p>
$arr = array(
[0] => 'Heading 1',
[1] => 'Heading 2',
[2] => 'Content'
);
<?php
$ps = array();
$count = preg_match_all('/<p[^>]*>(.*?)<\/p>/is', $a, $matches);
for ($i = 0; $i < $count; ++$i) {
$ps[] = $matches[0][$i];
}