πŸ“Š PHP
Q. What will be the result of the following?
Code:
$array = [1, 2, 3];
echo end($array);
  • (A) 3
  • (B) 1
  • (C) 2
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (A) 3

Explanation: end() advances array pointer to last element and returns its value.

Explanation by: Rati Dubey
end() advances array pointer to last element and returns its value.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
55
Total Visits
πŸ“½οΈ
9 mo ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
90%
Success Rate