Re: Expand variable in comparison
| From: | Jochem Maas | Date: | Sat, 19 Jan 2008 09:01:58 +0000 |
| Subject: | Re: Expand variable in comparison | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-267622@lists.php.net to get a copy of this message | ||
Marcus schreef:
Hi! Is there any way to get the following snippet returning a true? ... $this->var = ?????$this->var = $preDefinedStringToTestWith; echo $preDefinedStringToTestWith;
if ($this->var == $preDefinedStringToTestWith)what are you trying to do exactly? show us the code.return true;elsefalse;
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.