I am trying to implement preg_match for string containing special characters : "&$".
The code that i am using :
$f = fopen($path,"r");
while($lines = fgets($f))
{
if(preg_match("/\&\$/",trim($lines),$matches))
{
echo "Yes<br>";
}
}
I have already tried preg_match("/&\$/",$lines,$matches)
I am getting nothing as a result. (The file related to "$path" that i am using contains 2 lines containing "&$").
Plz help !!