πŸ“Š PHP
Q. Which of the following is the correct way to declare an array in PHP?
  • (A) $arr = array(1, 2, 3);
  • (B) $arr = [1, 2, 3];
  • (C) Both option1 and option2
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (C) Both option1 and option2

Explanation: PHP supports both array() function and short array syntax [] to declare arrays.

Explanation by: Rati Dubey
PHP supports both array() function and short array syntax [] to declare arrays.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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