Okay i'm trying to use regex to find an occurance of "<td>blah</td>" in a ob_get_contents() result. here is what i have so far
$var = "something";
// i have tried this:
if(preg_match("#<td>$var</td>#i", $retrievedhtml))
echo "yay!";
// and this
if(preg_match("/<td>$var<\/td>/i", $retrievedhtml))
echo "yay!";
However both seem to err on the closed html tag. ie it finds "$var", "<td>" and "<td>$var" just fine, but not "<td>$var</td>". Aslo it seems to find "</td>" fine but not "$var</td>".. hmm leads me to think it has a string terminator on it or something...
Any ideas what i'm doing wrong?
Thanks in advance
-emrys