nerdexam
Zend

200-530 · Question #17

Consider the following PHP script: 1. <?php 2. $charlist = array ( 3. 'a' => 'one', 4. 'b' => 'two', 5. ); 6. ************ 7. ?> Zend 200-530 Exam What statement will you write at line number 6…

The correct answer is C. echo strtr ('acb', $charlist). See the full explanation below for the reasoning.

Question

Consider the following PHP script: 1. <?php 2. $charlist = array ( 3. 'a' => 'one', 4. 'b' => 'two', 5. ); 6. *************** 7. ?> Zend 200-530 Exam What statement will you write at line number 6 instead of ***** to get the output onectwo?

Options

  • Aecho strtok ('acb', $charlist);
  • Becho strstr ('acb', $charlist);
  • Cecho strtr ('acb', $charlist);
  • Decho strip_tags('acb', $charlist);

How the community answered

(47 responses)
  • A
    19% (9)
  • B
    4% (2)
  • C
    70% (33)
  • D
    6% (3)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice