note 43920 rejected from function.preg-replace by tomsommer

From: Date: Thu, 08 Jul 2004 18:02:08 +0000
Subject: note 43920 rejected from function.preg-replace by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-72886@lists.php.net to get a copy of this message
Note Submitter: sanchezandoni@hotmail.com ---- Hello; I´m trying to change a value which code is in a database, for another one that is in the same row of the same tabla ,but in another column, from a text taken from another table ofmthe data base. I´ve tried doing this but it doesn´t work: <? mysql_connect("x","y","z"); mysql_select_db("y"); $query=mysql_query("SELECT * FROM guestbook"); while($a=mysql_fetch_row($query)){ $query2=mysql_query("SELECT * FROM emoticons"); while(b=mysql_fetch_row($query2)){ $text=$a[0]; $text=preg_replace("/$b[1]/", "<IMG src=\"b[2]\">", $a[0])"; } echo $text; } ?> Can anyone help me please!!! my e-mail is: sanchezandoni@hotmail.com

« previous php.notes (#72886) next »