Brandon Orther wrote:
>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.";
>
$var = "Hello ".($var2==1 ? "Mr. Bean" : "New Comer");
/franklin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
- [PHP] If statement within a variable? Brandon Orther
- Re: [PHP] If statement within a variable? Andrey Hristov
- Re: [PHP] If statement within a variable? Jack Dempsey
- Re: [PHP] If statement within a variable? * R&zE:
- Re: [PHP] If statement within a variable? Franklin van Velthuizen
- Re: [PHP] If statement within a variable? Alexander Skwar

