• 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
PHP’s numerically indexed array begin with position ______.

1
2
0
-1

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$names = array("Sam", "Bob", "Jack");
echo $names[0] . "is the brother of " . $names[1] . " and " . $names[1] . ".".$brother;

Sam is the brother of Bob and Bob) $brother
Sam is the brother of Bob and Bob)
Error
$brother

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$a = array("red", "green", "blue");
array_pop($a);
print_r($a);

Array ( [0] => green [1] => blue )
Array ( [0] => blue [1] => blue )
Array ( [0] => red [1] => green )
Array ( [0] => red [1] => blue )

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
4
2
6

ANSWER DOWNLOAD EXAMIANS APP

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

Option 1 and 4
Option 3 and 4
Option 2 and 4
Option 1 and 2

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
Which array function checks if the specified key exists in the array?

arrays_key_exists()
array_key_exists()
array_key_exist()
array_keys_exists()

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
↑