• 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?
$fruits = array ("apple", "orange", array ("pear", "mango"), "banana");
echo (count($fruits, 1));

5
3
6
4

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$fruits = array ("mango", "apple", "pear", "peach");
$fruits = array_flip($fruits);
echo ($fruits[0]);

mango
error
0
peach

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 population
population 11,35,000
karnataka 11,35,000

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What elements will the following script output?
$array = array (true => 'a', 1 => 'b');
var_dump ($array);

None
True => 'a', 1 => 'b'
1 => 'b'
It will output NULL

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$fruits = array ("apple", "orange", "banana");
echo (next($fruits));
echo (next($fruits));

orangebanana
orangeorange
appleapple
appleorange

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$fruits = array ("apple", "mango", "peach", "pear", "orange");
$subset = array_splice ($fruits, 2);
print_r ($fruits);

Array ( [0] => apple [1] => mango )
Error
Array ( [0] => pear [1] => orange )
Array ( [0] => apple [1] => mango [2] => peach )

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
↑