RE: [PHP] Variable Inside Variable

From: Date: Sat, 20 Apr 2002 16:42:05 +0000
Subject: RE: [PHP] Variable Inside Variable
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-93819@lists.php.net to get a copy of this message
> On Fri, 19 Apr 2002, Jeff Oien wrote: > >> Far better would be to put a placeholder in $body like @@@ and then just > >> do $body = ereg_replace('@@@', $url, $body); > > > > That's giving me a blank also. The form for changing the email is in a > > password protected area where only two people are allowed. But I'll > > implement the more secure version when I can get it to work. Thanks > > for the help. > > If that's giving you a blank then something else is wrong in your code. > This definitely does work: > > $body = "Hello, and thank you. Please visit the site @@@."; > $url = "http://boogers.on.toast/"; > $body = ereg_replace('@@@', $url, $body); > > Start from the simplest case, verify that it works, and then work out to > include all the other funky stuff you've got going on. > > miguel What I meant was this is giving me a blank still: $body = eval("return \"{$body}\";"); Just to clarify. I will be trying to narrow down the problem later today. Jeff Oien

« previous php.general (#93819) next »