MCQs > IT & Programming > PHP > What's the output? $array = array('dog','cat','pig'); $str = ' ' ; foreach($array as $value){ $value .= $value . $str; } print_r($array);;

PHP MCQs

What will the following code output? $array = array("dog","cat","pig"); $str = ""; foreach($array as $value){ $value .= $value . $str; } print_r($array);;

Answer

Correct Answer: Array([0] => dog [1] => cat [2] => pig)

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