> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Marcus
> Sent: Friday, January 18, 2008 4:51 PM
> To: php-general@lists.php.net
> Subject: [PHP] Expand variable in comparison
>
> Hi!
>
>
> Is there any way to get the foll
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)
return true;
else
false;
what are you trying to
You can cheat like this:
define('DEBUG', 1);
if (DEBUG || $this->var == $preDefinedStringToTestWith)
return true;
else
return false;
At some later date, you change the 1 to 0 in the define() statement.
Please tell us WHY you want do what you want to do...
On Fri, January 18, 2008 1:50 pm,
On Jan 19, 2008 9:52 AM, Richard Lynch <[EMAIL PROTECTED]> wrote:
> You can cheat like this:
>
> define('DEBUG', 1);
>
> if (DEBUG || $this->var == $preDefinedStringToTestWith)
> return true;
> else
> return false;
>
> At some later date, you change the 1 to 0 in the define() statement.
>
> Ple
4 matches
Mail list logo