&& and || question

From: Gordan (gordanMENE_at_torkulMAKNI.hr)
Date: 11/28/03


Date: Fri, 28 Nov 2003 13:22:07 +0100

I have two textboxes and one check box on my page
when the box is checked I want to do
if($text1 && $text2) do something
if the box isn't checked I want
if($text1 || text2) do something

of course I can put another if and check weather the box is checked or not
but I would like to do the following:

if($box is checked) $box="&&" else $box="||"
if($text1 $box $text2) do something

I would like the $box to become the operator in my if(..) clause (|| or &&)
Is that possible?

THANKS,
Gordan