preg match all - error in php code using preg_match_all -


hello done code need :) keep give me nothing , no result

ok here code

<?php $f='        <tr class="hover">              <td class="ra " >3.</td>             <td class="pla " ><a href="spieler.php?uid=3010">الـعـاصـفـة</a> </td>             <td class="al " ><a href="allianz.php?aid=127">|brave|</a></td>             <td class="pop " >2519</td>             <td class="vil " >6</td>         </tr>          <tr class="hover">              <td class="ra " >3.</td>             <td class="pla " ><a href="spieler.php?uid=4292">look</a> </td>             <td class="al " ><a href="allianz.php?aid=127">|brave|</a></td>             <td class="pop " >2001</td>             <td class="vil " >5</td>         </tr>          <tr class="hover">              <td class="ra " >4.</td>             <td class="pla " ><a href="spieler.php?uid=2784">بو سعود</a> </td>             <td class="al " ><a href="allianz.php?aid=127">|brave|</a></td>             <td class="pop " >1966</td>             <td class="vil " >5</td>         </tr>'; preg_match_all ("/<td class=\"pla \" ><a href=\"spieler.php?uid=(.*)\">(.*)<\/a> <\/td>/", $f, $result , preg_set_order); // putting data array foreach($result $item){    $player=$item[2];    $text = "$player "; print $text; }    ?> 

can 1 tell me wrong ? , show mw how fix ? alot

try use lazy regular expression:

replace this:

(.*) 

with this:

(.*?) 

also escape special signs . , ?


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -