nerdexam
Zend

200-530 · Question #508

You run the following PHP script: 1. <?php 2. for($x = 1; $x <= 2; $x++){ 3. for($y = 1; $y <= 3; $y++){ 4. if ($x == $y) continue; 5. print("x = $x y = $y<br>"); 6. } 7. } 8. ?> What will be the…

The correct answer is A. x = 2 y = 1 B. x = 2 y = 3 C. x = 1 y = 2 E. x = 1 y = 3. Zend 200-530 Exam

PHP Basics

Question

You run the following PHP script: 1. <?php 2. for($x = 1; $x <= 2; $x++){ 3. for($y = 1; $y <= 3; $y++){ 4. if ($x == $y) continue; 5. print("x = $x y = $y<br>"); 6. } 7. } 8. ?> What will be the output? Each correct answer represents a part of the solution. Choose all that apply.

Options

  • Ax = 2 y = 1
  • Bx = 2 y = 3
  • Cx = 1 y = 2
  • Dx = 2 y = 2
  • Ex = 1 y = 3
  • Fx = 1 y = 1

How the community answered

(43 responses)
  • A
    79% (34)
  • D
    7% (3)
  • F
    14% (6)

Explanation

Zend 200-530 Exam

Topics

#continue statement#nested loops#control flow#loop tracing

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice