National_Instruments
200-500 · Question #167
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?
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?
Options
- Aextract($test, "-");
- Bexplode("-", $test);
- Cto_array($test, "-");
- Dexplode($test, "-");
How the community answered
(31 responses)- A3% (1)
- B81% (25)
- C6% (2)
- D10% (3)
Community Discussion
No community discussion yet for this question.