Q. What will be the output?

Code:
$a = [1,2,3];
echo array_rand($a);
  • (A) Random key
  • (B) Random value
  • (C) Error
  • (D) NULL
πŸ’¬ Discuss
βœ… Correct Answer: (A) Random key
Explanation: array_rand returns random key.
Explanation by: Roshan
array_rand returns random key.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
48
Total Visits
πŸ“½οΈ
8 mo ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
92%
Success Rate