• HOME
  • QUIZ
  • CONTACT US
EXAMIANS
  • COMPUTER
  • CURRENT AFFAIRS
  • ENGINEERING
    • Chemical Engineering
    • Civil Engineering
    • Computer Engineering
    • Electrical Engineering
    • Mechanical Engineering
  • ENGLISH GRAMMAR
  • GK
  • GUJARATI MCQ

PHP Arrays

PHP Arrays
What will be the output of the following PHP code?
$number = array ("4", "hello", 2);
echo (array_sum ($number));

6
2
4hello2
4

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$state = array ("Karnataka", "Goa", "Tamil Nadu", "Andhra Pradesh");
echo (array_search ("Tamil Nadu", $state) );

1
False
2
True

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$a = array("A", "Cat", "Dog", "A", "Dog");
print_r(array_count_values($a));

Array ( [A] => 1 [Cat] => 1 [Dog] => 2 )
Array ( [A] => 2 [Cat] => 1 [Dog] => 1)
Array ( [A] => 2 [Cat] => 2 [Dog] => 1 )
Array ( [A] => 2 [Cat] => 1 [Dog] => 2 )

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following php code?
$states = array("karnataka" => array( "population" => "11,35,000", "captial" => "Bangalore"),"Tamil Nadu" => array( "population" => "17,90,000","captial" => "Chennai") );
echo $states["karnataka"]["population"];

11,35,000
karnataka 11,35,000
population 11,35,000
karnataka population

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code ?
$a = array(12, 5, 2);
echo(array_product($a));

060
120
024
010

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will the following script output?
$array = array (1, 2, 3, 5, 8, 13, 21, 34, 55);
$sum = 0;
for ($i = 0; $i < 5; $i++) {
$sum += $array[$array[$i]];
}
echo $sum;

5
NULL
78
19

ANSWER DOWNLOAD EXAMIANS APP
MORE MCQ ON PHP Arrays

DOWNLOAD APP

  • APPLE
    from app store
  • ANDROID
    from play store

SEARCH

LOGIN HERE


  • GOOGLE

FIND US

  • 1.70K
    FOLLOW US
  • EXAMIANSSTUDY FOR YOUR DREAMS.
  • SUPPORT :SUPPORT EMAIL ACCOUNT : examians@yahoo.com

OTHER WEBSITES

  • GUJARATI MCQ
  • ACCOUNTIANS

QUICK LINKS

  • HOME
  • QUIZ
  • PRIVACY POLICY
  • DISCLAIMER
  • TERMS & CONDITIONS
  • CONTACT US
↑