Re: Boolean type forced on string assignment inside if statement
| From: | Marc Guay | Date: | Wed, 02 Jan 2013 15:55:43 +0000 |
| Subject: | Re: Boolean type forced on string assignment inside if statement | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-319994@lists.php.net to get a copy of this message | ||
Interesting that if I wrap them up tighter in braces I get the desires result..
if (($a = "foo") && ($b = "bar")){
echo $a."<br />".$b;
}
Returns
foo
bar