Hi there i have this code:
$str = "<i><font color="800080"> man </font></i><p><font color="9898989"> hi </font></p><p><font color="1111111"> cheers </font></p>";
$pattern = '/<font .*?>(.*?)<\/font>/';
if(preg_match_all($pattern, addslashes($str), $posts)){
$i=0;
for($i; $i < count($posts[0]); $i++){
echo "content: " . $posts[0][$i] . "<br/>";
echo "colour: " . $posts[1][$i] . "<br/>";
echo "<br />";
}
}
and it doesn't work apparently because of the addslashes but its really needed as double quotes needs to be escaped, consider that i'm applying this code to a larger html file with hundreds of double quotes to be escaped....
error msg i get is Parse error: syntax error, unexpected T_LNUMBER in
thanks in advance..