What Will Be The Output Of The Following Php Codep Pre Langphp #64
What will be the output of the following PHP code?</p> <pre><code class="language-php" line="1"> <?php $fname = array("Peter", "Ben", "Joe"); $age = array("35", "37", "43"); $c = array_combine($fname, $age); print_r($c); ?> </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.4.
What will be the output of the following PHP code?
<?php $fname = array("Peter", "Ben", "Joe"); $age = array("35", "37", "43"); $c = array_combine($fname, $age); print_r($c); ?>
Array ( Peter Ben Joe )
Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 )
Array ( 35 37 43 )
Array ( “[Peter] => 35” “[Ben] => 37” “[Joe] => 43” )