• 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/>$array = array("red", "green");<br/>array_push($array, "blue", "yellow");<br/>print_r($array);

TRUE ANSWER : ?
YOUR ANSWER : ?

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

TRUE ANSWER : ?
YOUR ANSWER : ?

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

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code?<br/>$a = array("A", "Cat", "Dog", "A", "Dog");<br/>print_r(array_count_values($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 : ?

Which function will return true if a variable is an array or false if it is not?

TRUE ANSWER : ?
YOUR ANSWER : ?

What function computes the difference of arrays?

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/>$cars = array("Volvo", "BMW", "Toyota");<br/>echo "I like " . $cars[2] . ", " . $cars[1] . " and " . $cars[0] . ".";

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code?<br/>$array1 = array ("KA", "LA", "CA", "MA", "TA");<br/>$array2 = array ("KA", "IA", "CA", "GA", "TA");<br/>$inter = array_intersect ($array1, $array2);<br/>print_r ($inter);

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
↑