Re: If statement within a variable?
| From: | * R&zE: | Date: | Thu, 30 Aug 2001 16:11:51 +0000 |
| Subject: | Re: If statement within a variable? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-65315@lists.php.net to get a copy of this message | ||
<Original message>
From: * R&zE: <renze@datalink.nl>
Date: Thu, Aug 30, 2001 at 06:05:57PM +0200
Message-ID: <20010830180557.B15130@pro-pain.telemediair.nl>
Subject: Re: [PHP] If statement within a variable?
> This is it:
>
> $var = "Hello".($var2 = 1 ? "Mr. Bean" : "New Comer")."To
> The Coffee House.";
</Original message>
<Reply>
Oops... copying your code I also copied an error. It should be
"$var2 == 1" io "$var2 = 1". So your check will be:
$var = "Hello".($var2 == 1 ? "Mr. Bean" : "New Comer")."To The
Coffee House.";
</Reply>
--
* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: renze@datalink.nl
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- ««««««««««««««««««««««««