header


header

s.no Teacher_Name
1 Carmen

CODE

<?php $a = 40; $b = 5; if( $a && $b ) { echo "EXAM1 : Both a and b are true<br/>"; }else{ echo "EXAM1 : Either a or b is false<br/>"; } if( $a || $b ) { echo "EXAM2 : Either a or b is true<br/>"; }else{ echo "EXAM2 : Both a and b are false<br/>"; } if( $a and $b ) { echo "EXAM3 : Both a and b are true<br/>"; }else{ echo "EXAM3 : Either a or b is false<br/>"; } if( $a or $b ) { echo "EXAM4 : Either a or b is true<br/>"; }else { echo "EXAM4 : Both a and b are false<br/>"; } ?>

output:

EXAM1 : Both a and b are true EXAM2 : Either a or b is true EXAM3 : Both a and b are true EXAM4 : Either a or b is true