php array learning
Array: a collection of keywords and values. The same php array can store values of multiple different data types. The array subscript starts from zero
Several ways to create an array:
(1)
Php code
$arr[0]=1;//Array element
$arr[1]=2.8;
......
(2)
Php code
$arr = array(1, 2.8,"str",....);
(3)
Php code
//You can specify the subscript of the array element yourself
$arr = array("dizhi"=>"beijing ",..)//Use array("key"=>"value")