The 5 functions that get the intersection have 5 corresponding functions to get the difference set. I am the link. Array_intersect ($arr 1, $arr 2);//Gets the intersection of the array array_intersect_key ($arr 1, $arr 2);//Gets the intersection of
Common PHP array methods. Read the array $ arrarray (xx cross, yy); echo reads the first one :. $ arr [xx]; number of arrays $ arrayarray (aaa, bbb, ccc, ddd); number of echo arrays :. count ($ array ). n; calculate the array single // read the
Reading an array
$arr =array ("xx" = "fork", "yy" = "crooked");
echo "reads the first:". $arr [Number of xx];//statistics array
$array =array (AAA,BBB,CCC,DDD);
echo "Number of arrays:". Count ($array). " n "; Computes the number of array cells or
Array Value operations 1 value extraction PHP, use list to extract the value in the array, such as list ($ a, $ B) $ array, if the value in the list is more than the number of arrays, the redundant values in the list are set to NULL,
Array Value
This article to introduce a simple example of PHP introduction, here is mainly about the PHP array value operation and function and array traversal and array sorting examples, you can enter the reference.
Operation of Array values
1. Extraction of
This article will introduce you to a simple php entry-level instance. It mainly describes the operations and functions of php array values and the instances of array traversal and array sorting, for more information, see.
Array value operations
1.
Array Value operations1. Value extractionIn PHP, use list to extract the values in the array, such as list ($ a, $ B) = $ array. If the number of values in the list is greater than the number of arrays, the excess values in the list are set to NULL.
A dictionary class
Two sets of classes
A fast traversal of a three-array dictionary collection
Four-array sorting
Five array elements sorted by numeric size
First, the Dictionary classA dictionary to save a collection of data
1, what is Key-value Coding? Key-value coding is a mechanism for indirectly accessing object properties, using a string to identify a property, rather than by invoking an access method for an instance variable. The methods used are basically
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.