using placeholders and db results

From: Date: Sun, 05 Aug 2001 22:39:53 +0000
Subject: using placeholders and db results
Groups: php.general 
Request: Send a blank email to php-general+get-61361@lists.php.net to get a copy of this message
Here is an example of my code: $text = "Hi ##firstname## ##lastname##,"; $text = ereg_replace("##([^#]+)##", $row->."\\1", $text); $row-> is a result of using mysql_fetch_object. I would expect it to replace ##firstname## and ##lastname## with the value of $row->firstname and $row->lastname respectively... but nothing happens. I presume it is a variable problem... Can anyone help with this code? Matthew

« previous php.general (#61361) next »