PHP數(shù)組可以通過以下幾種方式定義:
$fruits = array("apple", "banana", "orange");
$fruits = ["apple", "banana", "orange"];
$numbers = range(1, 10);
$person = array("name" => "John", "age" => 30);
$person = array("name" => "John", 1 => "age");
list($name, $age) = array("John", 30);