I want to search through a webpage for the paragraph tag and slurp it into an array.
Below is the code I am using. It only finds the first paragraph tag. If anyone has an idea of what I am doing wrong, your help would be greatly appreaciated.
$text = "<p class=06Feedback style='mso-list:l10 level1 lfo35'><![if !supportLists]><span
style='font-family:Symbol'>·<span style='font:7.0pt \"Times New Roman\"'>
</span></span><![endif]>Select and use proper terminology in describing a
network.</p>
<p class=MsoNormal style='margin-left:.25in;text-indent:-.25in;mso-list:l10 level1 lfo35'><![if !supportLists]><span
style='font-family:Symbol'>·<span style='font:7.0pt \"Times New Roman\"'>
</span></span><![endif]><span style='color:black'>Describe the different roles
of the computer in a network.</span></p>
<p class=MsoNormal style='margin-left:.25in;text-indent:-.25in;mso-list:l10 level1 lfo35'><![if !supportLists]><span
style='font-family:Symbol'>·<span style='font:7.0pt \"Times New Roman\"'>
</span></span><![endif]>Identify the major types of networks.</p>
<p class=MsoNormal style='margin-left:.25in;text-indent:-.25in;mso-list:l10 level1 lfo35'><![if !supportLists]><span
style='font-family:Symbol'>·<span style='font:7.0pt \"Times New Roman\"'>
</span></span><![endif]>Evaluate professional certifications to acquire new
skills.</p>";
if (eregi("<p([>]|\n)*>", $text, $array)){
foreach ($array as $val)
echo"$val\n";
}