What will be the output of the following PHP code?

🎲 Try a Random Question  |  Total Questions in Quiz: 87  |  🧠 Study this quiz with Flashcards
This question is part of a full practice quiz:
PHP Programming Basics Practice Test: Looping Statements in PHP - IF ELSE IF, WHILE, FOR AND SWITCH — practice the complete quiz, review flashcards, or try a random question.

PHP supports four types of loops: While: Loops through a block of code until the condition evaluates to true Do...While: Runs the code block once, then evaluates the condition. If the condition is valid, the sentence will be repeated until the condition is no longer true For: Repeats a block of code a certain number of times Foreach: Iterates over arrays  Loops are useful for performing repetitive tasks, such as iterating over arrays, processing user input, generating output, and more.  Here are some examples of loops in PHP: For loop, While loop, Do while loop, and Foreach loop.  Here... Show more

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