Q. What will be the output?

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

πŸ’¬ Discussion


πŸ“Š Question Analytics

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