Examveda
Examveda

What will be the output of the following PHP code ?
<?php
$x = 0;
if ($x == 1)
    if ($x >= 0)
	print "true";
    else
	print "false"; 
?>

A. true

B. false

C. error

D. no output

Answer: Option D

Solution(By Examveda Team)

The nested for loop is not entered if outer condition is false.

This Question Belongs to PHP >> Control Structures(Loop In PHP)

Join The Discussion

Related Questions on Control Structures(Loop in PHP)