ExamVeda
Login
Home
This question belongs to PHP Basic PHP
Basic PHP
?

What will be the output of the following PHP code?
<?php
$user = array("Ashley", "Bale", "Shrek", "Blank");
for ($x=0; $x < count($user); $x++)
{
  if ($user[$x] == "Shrek") continue;
  printf ($user[$x]); 
}
?>

Answer & Solution
Correct Answer: Option B
The continue statement causes execution of the current loop iteration to end and commence at the beginning of the next iteration.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.