Hello!
I have a variable like this:
[code=php]$string =”<FONT color=”#548dd4″>Text</FONT>”;
To get data [B]#548dd4
[code=php]
<?php
$string =”<FONT color=”#548dd4″>Text</FONT>”;
preg_match_all(“/color=”(.*?)”/si”, $string, $matches);
print $matches[1][0]; //will out put #548dd4
?>
BUT if my variable like this (without double quote ” )
[code=php]$string =”<FONT color=#548dd4>Text</FONT>”;
then how come this code below doesn’t get data #548dd4
[code=php]
<?php
$string =”<FONT color=#548dd4>Text</FONT>”;
preg_match_all(“/color=(.*?)/si”, $string, $matches);
print $matches[1][0]; //out put BLANK – not #548dd4 – WHY ?? and How to make it work
?>
Thanks for helping me.
Kevin.