$var = $var2==1 ? 'Hello Mr. Bean' : 'Hello New Comer';
be careful of your if statements and only using one equals..

jack

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.";
> Thank you,
> Brandon Orther


-- 
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]

Reply via email to