A

Admin • 833K Points
Coach

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];
  • Correct Answer - Option(A)
  • Views: 29
  • Filed under category PHP
  • Hashtags:

Explanation by: Admin

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.