What Will Be The Output Of The Following Php Codep Pre Langphp #50
What will be the output of the following PHP code?</p> <pre><code class="language-php" line="1"> <?php $place = array("NYC", "LA", "Paris"); array_pop($place); $place1 = array("Paris"); $place = array_merge($place, $place1); print_r($place); ?> </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs107 PHP: Hypertext Preprocessor. It can also be found in gs gs107 PHP Array - PHP Array - Quiz No.2.
What will be the output of the following PHP code?
<?php $place = array("NYC", "LA", "Paris"); array_pop($place); $place1 = array("Paris"); $place = array_merge($place, $place1); print_r($place); ?>
Array ( [0] => LA [1] => Paris [2] => Paris )
Array ( [0] => NYC [1] => LA [2] => Paris)
Array ( [0] => NYC [1] => LA [2] => Paris [3] => Paris )
Array ( [0] => LA [1] => Paris )