nerdexam
Zend

200-530 · Question #182

You have a variable $test that contains sub-strings divided by a dash ("-"). How can you put every sub-string into an array element easily? Zend 200-530 Exam

The correct answer is B. explode("-", $test). See the full explanation below for the reasoning.

Question

You have a variable $test that contains sub-strings divided by a dash ("-"). How can you put every sub-string into an array element easily? Zend 200-530 Exam

Options

  • Aextract($test, "-");
  • Bexplode("-", $test);
  • Cto_array($test, "-");
  • Dexplode($test, "-");

How the community answered

(22 responses)
  • A
    9% (2)
  • B
    82% (18)
  • C
    5% (1)
  • D
    5% (1)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice