mam oto sobie taki kod:
Kod
$tmp='
<p class="tel">
</p>
<p class="tel">
tel.
<span class="t">
<a href="callto:+48111111111" >
11 111 11 11
</a>
</span>
</p>
<p class="tel">
tel.
<span class="t">
<a href="callto:+48666666666" >
66 666 66 66</a></span>';
<p class="tel">
</p>
<p class="tel">
tel.
<span class="t">
<a href="callto:+48111111111" >
11 111 11 11
</a>
</span>
</p>
<p class="tel">
tel.
<span class="t">
<a href="callto:+48666666666" >
66 666 66 66</a></span>';
Potrzebuje wyciągnąc z tego numery telefonów, ale nie idzie mi. Wychodzi tylko jeden. Stosuje takie wyrazenie:
Kod
preg_match_all('#(\s+.+)<p class="tel">(\s*|\s*.*\s*.*\s*.*\s*.*\s*.*\s*)<\/p>#im', $tmp, $telefon);
ale wyciaga ono mi tylko pierwszy telefon. Proszę o pomoc
