nerdexam
Zend

200-530 · Question #467

You want to parse the following string in PHP: $some_string="Student\tJohn\nMichel\tMaria"; Which of the following PHP functions will you use to parse the string according to the \t and \n characters?

The correct answer is C. strtok(). See the full explanation below for the reasoning.

Question

You want to parse the following string in PHP: $some_string="Student\tJohn\nMichel\tMaria"; Which of the following PHP functions will you use to parse the string according to the \t and \n characters?

Options

  • Asubstr()
  • Bstrrev()
  • Cstrtok()
  • Dstrtr()

How the community answered

(31 responses)
  • A
    3% (1)
  • B
    3% (1)
  • C
    84% (26)
  • D
    10% (3)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice