ssage-
> From: Khairul Azmi [mailto:[EMAIL PROTECTED]
> Sent: segunda-feira, 25 de Outubro de 2004 11:00
> To: [EMAIL PROTECTED]
> Subject: Re: assign operator as variable
>
> Actually I am looking for an alternative to replace the conventional
> symbol "&&" wit
if (eval("$cond1 $AND_operator $cond2"))
is this correct?
-Original Message-
From: Khairul Azmi [mailto:[EMAIL PROTECTED]
Sent: segunda-feira, 25 de Outubro de 2004 11:00
To: [EMAIL PROTECTED]
Subject: Re: assign operator as variable
Actually I am looking for an alternative
wrote:
> Maybe this can help
>
> $a = "1 or 0"; print eval($a);
>
>
>
> -Original Message-
> From: Khairul Azmi [mailto:[EMAIL PROTECTED]
> Sent: segunda-feira, 25 de Outubro de 2004 10:40
> To: [EMAIL PROTECTED]
> Subject: assign operator as
On Mon, 2004-10-25 at 11:39, Khairul Azmi wrote:
> I am not sure what category should this question fall under but this
> is what I plan to do.
>
> $cond1 = 1;
> $cont2 = 0;
> $oper1="&&"; # for AND
> $oper2="||"; # for OR
>
> if ($cond1 $oper1 $cond2) {
> print "one \n";
> } else {
> print
I am not sure what category should this question fall under but this
is what I plan to do.
$cond1 = 1;
$cont2 = 0;
$oper1="&&"; # for AND
$oper2="||"; # for OR
if ($cond1 $oper1 $cond2) {
print "one \n";
} else {
print "two \n";
}
The statement above would generates errors. Can somebody tel