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)- A3% (1)
- B3% (1)
- C84% (26)
- D10% (3)
Community Discussion
No community discussion yet for this question.