Expand variable in comparison
| From: | Marcus | Date: | Fri, 18 Jan 2008 19:50:59 +0000 |
| Subject: | Expand variable in comparison | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-267604@lists.php.net to get a copy of this message | ||
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. Thanks for your help, Marcus.