• 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 QUIZ

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

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code ?<br/>$number = range(0, 5);<br/>print_r ($number);

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code ?<br/>$age = array("Harry" => "21", "Ron" => "23","Malfoy" => "21");<br/>array_change_key_case($age, CASE_UPPER);<br/>array_pop($age);<br/>print_r($age);

TRUE ANSWER : ?
YOUR ANSWER : ?

Assume you would like to sort an array in ascending order by value while preserving key associations. Which of the following PHP sorting functions would you use?

TRUE ANSWER : ?
YOUR ANSWER : ?

PHP’s numerically indexed array begin with position ______.

TRUE ANSWER : ?
YOUR ANSWER : ?

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

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code?<br/>$a = array("a"=>"red", "b"=>"green", "c"=>"blue");<br/>echo array_shift($a);<br/>print_r ($a);

TRUE ANSWER : ?
YOUR ANSWER : ?

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

TRUE ANSWER : ?
YOUR ANSWER : ?

Array values are keyed by ______ values (called indexed arrays) or using ______ values (called associative arrays). Of course, these key methods can be combined as well.

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code?<br/>$a1 = array("a"=>"red", "b"=>"green", "c"=>"blue", "d"=>"yellow");<br/>$a2 = array("e"=>"red", "f"=>"green", "g"=>"blue");<br/>$result = array_diff($a1, $a2);<br/>print_r($result);

TRUE ANSWER : ?
YOUR ANSWER : ?
MORE MCQ

QUIZ STATS

  • 0
  • 0

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
↑