Q1What will be the output of the PHP code given below Marks
Q1.What will be the output of the PHP code given below Marks [0.5]
$v = 1;
$m = 2; $l = 3;
if( $l > $m > $v)
{
echo \"yes\";
}
Else {
echo \"no\";
}
Solution
The output would be : syntax error, unexpected \'>\'
multiple > symbol cannot be used in a single statment
instead if you change the expression to
if($l>$m && $m>$v)
then the output would be \"yes\"
![Q1.What will be the output of the PHP code given below Marks [0.5] $v = 1; $m = 2; $l = 3; if( $l > $m > $v) { echo \ Q1.What will be the output of the PHP code given below Marks [0.5] $v = 1; $m = 2; $l = 3; if( $l > $m > $v) { echo \](/WebImages/47/q1what-will-be-the-output-of-the-php-code-given-below-marks-1147290-1761616962-0.webp)
