πŸ“Š PHP
Q. Which of the following is a correct way to create an array in PHP?
  • (A) $arr = array(1, 2, 3);
  • (B) $arr = array{1, 2, 3};
  • (C) $arr = [1 -> 2 -> 3];
  • (D) $arr = array[1, 2, 3];
πŸ’¬ Discuss
βœ… Correct Answer: (A) $arr = array(1, 2, 3);

Explanation: The array() function is used to declare arrays in PHP.

Explanation by: Rati Dubey
The array() function is used to declare arrays in PHP.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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