1. Extraction of values
In PHP, a list is used to extract the values in the array, such as list ($a, $b) = $array. If the value in the list is more than the number of arrays, the extra value in list is set to NULL. You can also use commas to jump through values in the array, such as list ($a, $b) = $array.
2. Dividing an array
If you want to get a subarray, you can use Array_slice (array, offset, length) to get. It returns an array with a new subscript starting at 0. If the index of the original array is a string, it seems that there is no meaning, it is best not to use, you can use Array_splice to get the substring.
3. Dividing the array into multiple arrays
Use Array_chunk to divide an array into a two-dimensional array. Detailed information can be seen through the official description of the link.
4. Keys and values
Array_keys ($array), gets an array of array indexes
Array_value ($array), gets an array of array values, and the index is reassigned starting from 0.
Array_key_exists ($key, array), whether the element exists for checking.
Array_splice, delete the insertion element.
5. Conversions between arrays and variables
Extract (array) to change an array into a variable
Compact () turns the variable into an array
The above describes the Photoshop learning PHP Learning array values, including the content of Photoshop learning, I hope the PHP tutorial interested in a friend helpful.