note 43920 added to function.preg-replace
| From: | sanchezandoni at hotmail dot com | Date: | Thu, 08 Jul 2004 17:49:11 +0000 |
| Subject: | note 43920 added to function.preg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-72885@lists.php.net to get a copy of this message | ||
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
----
Manual Page -- http://www.php.net/manual/en/function.preg-replace.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43920
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43920&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43920&report=yes
Search -- http://master.php.net/manage/user-notes.php