2 What will be the output of the following PHP codea ltphp s

2. What will be the output of the following PHP code?a

<?php

$states = array("Canada" => array( "population" => "35,000,000", "capital" => "Ottawa"),

"France" => array( "population" => "64,600,000", "capital" => "Paris")

"Germany" => array( "population" => "82,600,000", "capital" => "Berlin") );

echo "population=" . $states["France"]["population"] . " capital=" .

$states["Germany"]["capital"];

?>

a) Nothing (syntax error)

b) population=64,600,000 capital=Paris

c) population=64,600,000 capital=Berlin

d) population=82,600,000 capital=Berlin

e) population=82,600,000 . capital=Berlin

Solution

PHP stands for Hypertext Preprocessor .It is used to create dynamic webpages and also have the ability to support databases like sql .

So, Both A and B options are right, so right option is d

2. What will be the output of the following PHP code?a <?php $states = array("Canada" => array( "population" =

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site