PHP program, how does this work?

Talon D

New member
$result = ( $a >= $b ) && ( $c < $d );
&& is a logical and so if 10 >= 3 and 7 < 20 then result is true

$result = ( $a < $b ) || ( $c <= $d );
|| is logical or so if 10 < 3 or 7 <= 20 then result is true

$result = $a % $b;
% is the modulo operator so result =10 mod 3
 
Given the values of $a=10, $b=3, $c=7, and $d=20, print the value of $result:

$result = ( $a >= $b ) && ( $c < $d );
$result = ( $a < $b ) || ( $c <= $d );
$result = $a % $b;

I dont even know what this question is asking me. if you know please tell me or if you know the answer thats helpfull too. thx
 
$result = ( $a >= $b ) && ( $c < $d );
&& is a logical and so if 10 >= 3 and 7 < 20 then result is true

$result = ( $a < $b ) || ( $c <= $d );
|| is logical or so if 10 < 3 or 7 <= 20 then result is true

$result = $a % $b;
% is the modulo operator so result =10 mod 3
 
Back
Top