Andrés Robinet wrote:
-----Original Message-----
From: news [mailto:news@xxxxxxxxxxxxx] On Behalf Of Marcus
Sent: Friday, January 18, 2008 4:51 PM
To: php-general@xxxxxxxxxxxxx
Subject: Expand variable in comparison
Hi!
Is there any way to get the following snippet returning a true?
...
$this->var = ?????
if ($this->var == $preDefinedStringToTestWith)
return true;
else
false;
The problem:
I don't know, what $preDefinedStringToTestWith is!
$this->var can be set to any string.
I tried
$this->var = "${preDefinedStringToTestWith}"
but this doesn't get expanded.
Uh! Shouldn't it work?
$this->var = $preDefinedStringToTestWith
For certain reason $this->var can only be set to a string and not to a variable!
Any suggestions?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php