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]);
}

AshleyBale
AshleyBaleBlank
No output
AshleyBaleShrek

ANSWER DOWNLOAD EXAMIANS APP

PHP Control Structures (Loop)
What will be the output of the following PHP code ?
$i = "";
while ($i) {
print "hi";
}
while($i < 8)
$i++;print "hello";

Hi is printed 10 times, hello 7 times
Hi is printed 8 times, hello 7 times and then hi 2 times
Hi is printed once, hello 7 times
Hi is printed once, hello 7 times and then hi 2 times

ANSWER DOWNLOAD EXAMIANS APP