This article explains the analysis of array types in PHP
The array of PHP is an ordered map. A map is a type associated with a key and value.
The key of an array of PHP can be either a string type or an integer type. If key is a float type, it is automatically converted to an integer type.
If the maximum value of an index for a key,integer type is not specified for a value, the new key is the maximum value plus 1. If the new key is already assigned, the value will be overwritten.
$arr = Array (a,b,5=>c,d,e,6=>g);
Echo
;
Print_r ($arr);
;
Code Run Results
Array (
[0] = a
[1] = b
[5] = C
[6] = g
[7] = = e)
This way. Only so there is no value "D" because he was covered by the 6=>g of the back.
I hope this article can be of some benefit to you.
http://www.bkjia.com/PHPjc/486155.html www.bkjia.com true http://www.bkjia.com/PHPjc/486155.html techarticle This article explains the array type analysis in PHP. The array of PHP is an ordered map. A map is a type associated with a key and value. The key of an array of PHP can be either a string type or an int ...