• 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));

6
4
3
5

ANSWER DOWNLOAD EXAMIANS APP

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

in_array()
do_array()
is_array()
this_array()

ANSWER DOWNLOAD EXAMIANS APP

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

4hello2
2
6
4

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
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?

asort()
ksort()
sort()
usort()
krsort()

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code ?
$a = array("a" => "Jaguar", "b" => "Land Rover", "c" => "Audi", "d" => "Maseratti");
echo array_search("Audi", $a);

a
b
c
d

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
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”);

2 and 3
2, 3 and 4
Only 1
3 and 4

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
↑