MCQs > IT & Programming > PHP > How would you create a numeric array from the following string that did not include '-test' and where each digit had its own array key? $str = '6.1.4.2.6-test';

PHP MCQs

How would you create a numeric array from the following string that did not include "-test" and where each digit had its own array key? $str = '6.1.4.2.6-test';

Answer

Correct Answer: $arr = explode('-', $str); $arr = explode('.', $arr[0]);

Explanation:

Note: This Question is unanswered, help us to find answer for this one

PHP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

PHP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it