Expand variable in comparison

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux