Array_change_key_case ($arr, Case_lower | | Case_upper) returns an array whose key names are all uppercase or lowercase
Array_rand ($arr, num) randomly extracts one or more cells from an array
Shuffle (& $arr) scrambling the array
Array_chunk
Array_multisort () sorts multiple arrays or multi-dimensional arrays at a time or by one dimension. The original key-name association is retained during sorting. the implemented functions are as follows ......?
Cut a 1-dimension component into a
List (): traverses the array array_map (function_name, array): The first parameter is the function used to modify the elements of the delayed array. The second function is the settype (var, type_string) of the array to be iterated ): converting the
Mixedarray_shift (array & amp; $ array) function: removes elements starting with an array. description: array_shift () & nbsp; array & nbsp; remove the first unit of and return the result. the length of & nbsp; array & nbsp; is subtracted and all
Use thisArticleMake a mark and check it quickly. Haha
$. Makearray (data)-convert data into real arrays.
$. Inarray (element, array)-returns the index position of the element in the array.$. Merge (first array, second array)-merges two arrays and
/*** Xml2array () will convert the given XML text to an array in the XML structure. * Link: http://www.bin-co.com/php/scripts/xml2array/ * Arguments: $ contents-The XML text * $ get_attributes-1 or 0. if this is 1 the function will get the
As follows:Copy codeThe Code is as follows:/*** Xml2array () will convert the given XML text to an array in the XML structure.* Link: http://www.bin-co.com/php/scripts/xml2array/* Arguments: $ contents-The XML text* $ Get_attributes-1 or 0. If this
Php tutorial array overview and array FunctionsThe array function allows you to operate on arrays.
Php supports single-dimension and multi-dimensional arrays. At the same time, the database query results are provided to construct an array function.
If there is a large array and you need to find out whether it contains a specific element, you can use the PHP Array Function in_array (). The following example shows "Not found in this array", because Albert is searched in an array named $
Tested:If (isset ($ array [$ I]) {echo "exists ";}If (array_key_exists ($ I, $ array) {echo "exists ";}When the number of arrays is 10, the difference between the two is shown that the isset speed is nearly 10 times faster, but it is not very
PHP Array Function notes
Array_change_key_case--Returns an array with string key names all lowercase or uppercaseArray_chunk--Splitting an array into multipleArray_combine-Creates an array with the value of an array as its key name, and the value
PHP Array Function notes
Array_change_key_case--Returns an array with string key names all lowercase or uppercaseArray_chunk--Splitting an array into multipleArray_combine-Creates an array with the value of an array as its key name, and the value
Method one, the definition and initialization of JS array
Defining a one-dimensional array
Method 1:
var _thearray = new Array);//define
_thearray[0]= "1";
_thearray[1]= "2";
_thearray[2]= "3";
Class
Method 2:
var _thearray = new
Array_sum () Definition and usageThe Array_sum () function returns the sum of all the values in the array.
If all values are integers, an integer value is returned. Returns a floating-point number if one or more of the values are floating-point
This chapter describes several common internal functions of the PHP array.
In the previous we have introduced the PHP array, created an array with the arrays () function, deletes an array element with the unset () function. In this chapter we will
Array_flip () Definition and usageThe Array_flip () function swaps the key name of the array with its corresponding value, where the key name becomes a value and the value becomes the key.The Array_flip () function returns an inverted array, and if
In programming to look up the manual is indispensable, so you will learn to use the existing things, as in PHP, the array processing function already has a sort function, why write something is a hard to write bubble or heap row or fast row.
Array manipulation functions
Join (delimiter) to use delimiters (delimiter) for each element in the array as a stringConcat (Array1, array2, ...) Merges the array, does not affect the original array, but returns the merged new arrayPop () deletes
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.