Re: If statement within a variable?

From: Date: Thu, 30 Aug 2001 16:03:44 +0000
Subject: Re: If statement within a variable?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-65308@lists.php.net to get a copy of this message
$var="Hello".(($var==1)? "Mr. Bean":"New Comer")."To somewhere"; Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS ----- Original Message ----- From: "Brandon Orther" <orther@webintellects.com> To: "PHP User Group" <php-general@lists.php.net> Sent: Thursday, August 30, 2001 6:59 PM Subject: [PHP] If statement within a variable? > Hello, > > Is there a way to put an if statement in a variable? > > For example: > > $var = "Hello".IF($var2 = 1) { ."Mr. Bean". } else { ."New > Comer". }." > To The Coffee House."; > Thank you, > Brandon Orther >

« previous php.general (#65308) next »