adplus-dvertising
frame-decoration

Question

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

a.

AshleyBaleBlank

b.

AshleyBale

c.

AshleyBaleShrek

d.

No output

Answer: (a).AshleyBaleBlank

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the following PHP code ?