RE: [PHP] Variable Inside Variable

From: Date: Sat, 20 Apr 2002 01:33:12 +0000
Subject: RE: [PHP] Variable Inside Variable
Groups: php.general 
Request: Send a blank email to php-general+get-93774@lists.php.net to get a copy of this message
> On Friday 19 April 2002 09:31, Jeff Oien wrote: > > I have a script which retrieves the body of an email message from > > a MySQL database to be sent to someone who applies using a form. > > The script contains this: > > > > $url = "<a > > > > href=\"http://$HTTP_HOST$SCRIPT_NAME\">http://$HTTP_HOST$SCRIPT_NAME</a>"; > > $url = addslashes("$url"); > > > > $msg1 .= "$body"; //to be sent via mail() > > > > Then within the body of the message I want $url to show up. > > The body of the message in the database looks like this: > > ----------- > > You are receiving this exclusive message to confirm your > > application through $url. > > ----------- > > I've tried everything I can think of with $url, curly brackets, backslashes > > etc. What am I missing? Thanks. > > Use eval(). I have $url (literally) embedded in some text in the database that is to be sent as an email message. I'm using this and $url disappears with a blank spot in the text: eval("\$body = \"$body\";"); I've tried variations and can't get it to work. Any help? Thanks. Jeff Oien

« previous php.general (#93774) next »