Now Im sure this is really easy, but for some reason its testing me and then moved onto the annoying stage, so in comes help from the forums 🙂
All I want to do is go through a string a replace all oocurences of (y) with (n)
The data im getting is from a db. Heres my snippet of code ..
for($i=0; $i<mysql_num_rows($result); $i++)
{
$row = mysql_fetch_row($result);
$rowtext = $row[1];
ereg_replace("(y)", "(n)", $rowtext);
//then replace in db
}
But its not replacing the (y) with a (n). I think its somethign to do with the use of brackets. But anyway any help appreciated 🙂
Thanks
Nick