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

3
6
4
5

ANSWER DOWNLOAD EXAMIANS APP

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

Positive number, negative number
Float, string
Integer, string
String, Boolean
Even number, string

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What functions count elements in an array?
1. count
2. Sizeof
3. Array_Count
4. Count_array

Option 2 and 4
Option 1 and 2
Option 1 and 4
Option 3 and 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]);

peach
0
error
mango

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

appleapple
orangebanana
orangeorange
appleorange

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] => 2 [Cat] => 2 [Dog] => 1 )
Array ( [A] => 2 [Cat] => 1 [Dog] => 2 )
Array ( [A] => 1 [Cat] => 1 [Dog] => 2 )
Array ( [A] => 2 [Cat] => 1 [Dog] => 1)

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
↑