After defining a variable, by default the first statement is true and the second statement is false, right?
手机用户1571880571
手机用户1571880571 2019-10-24 18:18:47
0
3
1216

<?php

$a=true;

if($a){

echo'rich';

echo'buy snacks';

}

else{

echo'no money';

echo'can't afford it';

}


?>


手机用户1571880571
手机用户1571880571

reply all(2)
卢小强

Then the second one is FALSE,

卢小强

You can add another if ($a=false) {echo '!!!!1'} to the if to see the result

  • reply After changing $a to false, the second result will be output
    手机用户1571880571 author 2019-10-25 09:10:45
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template