Re: Boolean type forced on string assignment inside if statement
| From: | Stephen | Date: | Wed, 02 Jan 2013 16:05:10 +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-319995@lists.php.net to get a copy of this message | ||
On 13-01-02 10:53 AM, Marc Guay wrote:
Hi folks, if ($a = "foo" && $b = "bar"){&& takes precedence over = http://php.net/manual/en/language.operators.precedence.php You may want to use brackets -- Stephenecho $a."<br />".$b;} Returns: 1 bar I expect: foo bar Is this documented?