preg_match_all problems
Posted: Wed Aug 24, 2005 12:30 am
Hi Sirs,
I have this PHP code:
using this PHP code to copy from an HTML source:
My PHP code is wrong? Where is the wrong in my php code?
Please help
Regards,
Dan
I have this PHP code:
Code: Select all
// Output
$s = $source->getSource();
if (preg_match_all('{<td><font face="verdana,sans-serif" size=(1¦2)\s?(color=E8E8E8)?> ?([0-9]+?)</td>\n<td>( <a href="(.+?)">)?<font face="verdana,sans-serif" size=(1¦2) color=(#000000¦E8E8E8)>( )?(.+?)</a></td>}is', $s, $out, PREG_SET_ORDER)) {
for($i=0;$i<count($out);$i++) {
array_push($keywords, $out[$i][3].'~'.$out[$i][9]);
}Code: Select all
<td><font face="verdana,sans-serif" size=1> 53021</td>
<td> <a href="?article=free&mkt=us"><font face="verdana,sans-serif" size=1 color=#000000>free</a></td>
</tr>Please help
Regards,
Dan