adplus-dvertising
frame-decoration

Question

What will be the output of the following PHP code ?
<?php
$x = 1;
if ($x == 2)
    print "hi" ;
else if($x = 2)
    print $x;
else
    print "how are u";
?>

a.

error

b.

2

c.

hi

d.

how are u

Answer: (b).2

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the following PHP code ?