PHP Control Structures (Loop) What will be the output of the following PHP code ?$a = array("hi", "hello", "bye");foreach ($a as $value) {if (count($a) == 2)print $value;} no output hihello infinite loop hihellobye no output hihello infinite loop hihellobye ANSWER DOWNLOAD EXAMIANS APP
PHP Control Structures (Loop) What will be the output of the following PHP code ?$user = array("Ashley", "Bale", "Shrek", "Blank");for ($x=0; $x < count($user) - 1; $x++) {if ($user[$x++] == "Shrek")continue;printf ($user[$x]);} Bale AshleyShrek BaleBlank AshleyBaleBlank Bale AshleyShrek BaleBlank AshleyBaleBlank ANSWER DOWNLOAD EXAMIANS APP
PHP Control Structures (Loop) What will be the output of the following PHP code ?for (1; $i == 1; $i = 2)print "In for loop ";print "After loopn"; In for loop Infinite loop After for loop In for loopAfter for loop In for loop Infinite loop After for loop In for loopAfter for loop ANSWER DOWNLOAD EXAMIANS APP
PHP Control Structures (Loop) What will be the output of the following PHP code ?for ($i = 0; $i < 5; $i++) {for ($j = $i; $j > 0; $i--)print $i;} infinite loop 0 1 0 1 2 0 1 2 3 0 1 2 3 4 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 no output infinite loop 0 1 0 1 2 0 1 2 3 0 1 2 3 4 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 no output ANSWER DOWNLOAD EXAMIANS APP
PHP Control Structures (Loop) What will be the output of the following PHP code ?for ($count = 0; $count<3;$count++); {print "hi";break;print "hello";} hihellohihellohihello hihihi hellohellohello hi hihellohihellohihello hihihi hellohellohello hi ANSWER DOWNLOAD EXAMIANS APP
PHP Control Structures (Loop) What will be the output of the following PHP code ?$user = array("Ashley", "Bale", "Shrek", "Blank");for ($x = 0; $x < count($user); $x++) {if ($user[$x] == "Shrek")continue;printf ($user[$x]);} AshleyBaleBlank AshleyBaleShrek No output AshleyBale AshleyBaleBlank AshleyBaleShrek No output AshleyBale ANSWER DOWNLOAD EXAMIANS APP