<?php
$str= <<<ETO
<p>one
two</p>
<p>three</p>
ETO;
preg_match_all('/<p>(.*?)<\/p>/',$str,$r);
print_r($r);
?>
I am studying preg_match_all
. I want get all the p
from one article. but my code only get the second p
. how to modify so that I can get the first p
, either. Thanks.