What will be the output of the following PHP code ?
<?php
$auth = 1;
$status = 1;
if ($result = (($auth == 1) && ($status != 0)))
{
print "result is $result";
}
?>
<?php
$auth = 1;
$status = 1;
if ($result = (($auth == 1) && ($status != 0)))
{
print "result is $result";
}
?>
A. result is true
B. result is 1
C. error
D. no output
Answer: Option B

Join The Discussion