CSE :: PHP - CS
-
Which of the following are correct ways of creating an array?
1. state[0] = “karnataka”;
2. $state[] = array(“karnataka”);
3. $state[0] = “karnataka”;
4. $state = array(“karnataka”); -
What will be the output of the following php code?
<?php
$states = array("karnataka" => array( "population" => "11,35,000", "captial" => "Bangalore"),"Tamil Nadu" => array( "population" => "17,90,000","captial" => "Chennai") );
echo $states["karnataka"]["population"];
?>
- Which function will return true if a variable is an array or false if it is not?
- Which in-built function will add a value to the end of an array?