- foreach ($arr as $key = $value)
- {
- echo $value. "
";
- }
Copy Code
2), when the assignment is made with $arr[], the bidding clubs under the array is subscript with the current maximum subscript +1 ($arr [Maximum +1]). Example:
$value) {echo $key. ' = '. $value. " "; } Output:/*0 =11 =str2 =4 =45 =xint2 =76 =xx*/?>
4, in PHP, the array is self-increment, and in C + + is different 5, about the function of the array 1), count the number of statistics array. 2), IsArray to determine if a variable is not an array of 3), explode text segmentation. 4), unset destroy the elements of a variable or array. Unset does not change the sequence of the array after it is destroyed. 6, the array operator $a+ $b to add array B to the array a, removing the same key. The same key is not overwritten. The digital subscript is the same
= FSDFSS [c] = Lengai)?>
Code Description: $a = = $b arrays A and array B key values are the same $a = = = $b The array A and B are not just the same as the key values, but the order must be the same. $a <> $b arrays A and array B are not the same. $a!== $b arrays A and array B are not congruent. Let's summarize these, hope to help you. To learn PHP programming, you come to the programmer's home.
|