diff --git a/reference/array/functions/array-flip.xml b/reference/array/functions/array-flip.xml index d2be035630..09dde78eb9 100644 --- a/reference/array/functions/array-flip.xml +++ b/reference/array/functions/array-flip.xml @@ -1,13 +1,12 @@ - - + array_flip Exchanges all keys with their associated values in an array - - Description + + &reftitle.description; arrayarray_flip arraytrans @@ -28,10 +27,33 @@ If a value has several occurrences, the latest key will be used as its values, and all others will be lost. + + + + &reftitle.parameters; - array_flip returns &false; - if it fails. + + + trans + + + An array of key/value pairs to be flipped. + + + + + + + + &reftitle.returnvalues; + + Returns the flipped array on success and &false; on failure. + + + + + &reftitle.examples; <function>array_flip</function> example @@ -71,10 +93,16 @@ Array + + + + &reftitle.seealso; - See also array_values, - array_keys, and - array_reverse. + + array_values + array_keys + array_reverse + diff --git a/reference/array/functions/array-intersect-assoc.xml b/reference/array/functions/array-intersect-assoc.xml index 1a8dc2456d..36d347cca2 100644 --- a/reference/array/functions/array-intersect-assoc.xml +++ b/reference/array/functions/array-intersect-assoc.xml @@ -1,12 +1,13 @@ - + array_intersect_assoc Computes the intersection of arrays with additional index check - - Description + + + &reftitle.description; arrayarray_intersect_assoc arrayarray1 @@ -19,6 +20,50 @@ that are present in all the arguments. Note that the keys are used in the comparison unlike in array_intersect. + + + + &reftitle.parameters; + + + + array1 + + + The array with master values to check. + + + + + array2 + + + An array to compare values against. + + + + + array + + + A variable list of arrays to compare. + + + + + + + + + &reftitle.returnvalues; + + Returns an associative array containing all the values in + array1 that are present in all of the arguments. + + + + + &reftitle.examples; <function>array_intersect_assoc</function> example @@ -59,14 +104,18 @@ Array the same. - - See also array_intersect, - array_uintersect_assoc, - array_intersect_uassoc, - array_uintersect_uassoc, - array_diff and - array_diff_assoc. - + + + + &reftitle.seealso; + + array_intersect + array_uintersect_assoc + array_intersect_uassoc + array_uintersect_uassoc + array_diff + array_diff_assoc + diff --git a/reference/array/functions/array-intersect-key.xml b/reference/array/functions/array-intersect-key.xml index edc5642785..a43a3811ad 100644 --- a/reference/array/functions/array-intersect-key.xml +++ b/reference/array/functions/array-intersect-key.xml @@ -1,12 +1,13 @@ - + array_intersect_key Computes the intersection of arrays using keys for comparison - - Description + + + &reftitle.description; arrayarray_intersect_key arrayarray1 @@ -18,6 +19,51 @@ containing all the values of array1 which have matching keys that are present in all the arguments. + + + + &reftitle.parameters; + + + + array1 + + + The array with master keys to check. + + + + + array2 + + + An array to compare keys against. + + + + + array + + + A variable list of arrays to compare. + + + + + + + + + &reftitle.returnvalues; + + Returns an associative array containing all the values of + array1 which have matching keys that are present in all + arguments. + + + + + &reftitle.examples; <function>array_intersect_key</function> example @@ -59,19 +105,25 @@ array(2) { a strict type check is executed so the string representation must be the same. + + + + &reftitle.seealso; - See also array_diff, - array_udiff - array_diff_assoc, - array_diff_uassoc, - array_udiff_assoc, - array_udiff_uassoc, - array_diff_key, - array_diff_ukey, - array_intersect, - array_intersect_assoc, - array_intersect_uassoc and - array_intersect_ukey. + + array_diff + array_udiff + array_diff_assoc + array_diff_uassoc + array_udiff_assoc + array_udiff_uassoc + array_diff_key + array_diff_ukey + array_intersect + array_intersect_assoc + array_intersect_uassoc + array_intersect_ukey + diff --git a/reference/array/functions/array-intersect-uassoc.xml b/reference/array/functions/array-intersect-uassoc.xml index b4aa73c949..0dd5eda6b4 100644 --- a/reference/array/functions/array-intersect-uassoc.xml +++ b/reference/array/functions/array-intersect-uassoc.xml @@ -1,12 +1,13 @@ - + array_intersect_uassoc Computes the intersection of arrays with additional index check, compares indexes by a callback function - - Description + + + &reftitle.description; arrayarray_intersect_uassoc arrayarray1 @@ -26,6 +27,58 @@ if the first argument is considered to be respectively less than, equal to, or greater than the second. + + + + &reftitle.parameters; + + + + array1 + + + Initial array for comparision of the arrays. + + + + + array2 + + + First array to compare keys against. + + + + + array + + + Variable list of array arguments to compare values against. + + + + + key_compare_func + + + User supplied callback function to do the comparision. + + + + + + + + + &reftitle.returnvalues; + + Returns the values of array1 whose values exist + in all of the arguments. + + + + + &reftitle.examples; <function>array_intersect_uassoc</function> example @@ -50,13 +103,19 @@ Array + + + + &reftitle.seealso; - See also array_intersect, - array_intersect_assoc, - array_uintersect_assoc, - array_uintersect_uassoc, - array_intersect_key and - array_intersect_ukey. + + array_intersect + array_intersect_assoc + array_uintersect_assoc + array_uintersect_uassoc + array_intersect_key + array_intersect_ukey + diff --git a/reference/array/functions/array-intersect-ukey.xml b/reference/array/functions/array-intersect-ukey.xml index 981055e579..a9b9d0ec85 100644 --- a/reference/array/functions/array-intersect-ukey.xml +++ b/reference/array/functions/array-intersect-ukey.xml @@ -1,12 +1,12 @@ - + array_intersect_ukey Computes the intersection of arrays using a callback function on the keys for comparison - - Description + + &reftitle.description; arrayarray_intersect_ukey arrayarray1 @@ -25,6 +25,58 @@ first key is considered to be respectively less than, equal to, or greater than the second. + + + + &reftitle.parameters; + + + + array1 + + + Initial array for comparision of the arrays. + + + + + array2 + + + First array to compare keys against. + + + + + array + + + Variable list of array arguments to compare keys against. + + + + + key_compare_func + + + User supplied callback function to do the comparision. + + + + + + + + + &reftitle.returnvalues; + + Returns the values of array1 whose keys exist + in all the arguments. + + + + + &reftitle.examples; <function>array_intersect_ukey</function> example @@ -69,19 +121,25 @@ array(2) { the two arrays. A match still occurs because only the keys are checked. The values returned are those of array1. + + + + &reftitle.seealso; - See also array_diff, - array_udiff - array_diff_assoc, - array_diff_uassoc, - array_udiff_assoc, - array_udiff_uassoc, - array_diff_key, - array_diff_ukey, - array_intersect, - array_intersect_assoc, - array_intersect_uassoc and - array_intersect_key. + + array_diff + array_udiff + array_diff_assoc + array_diff_uassoc + array_udiff_assoc + array_udiff_uassoc + array_diff_key + array_diff_ukey + array_intersect + array_intersect_assoc + array_intersect_uassoc + array_intersect_key + diff --git a/reference/array/functions/array-intersect.xml b/reference/array/functions/array-intersect.xml index adc9f227b3..ecbfe6dbd9 100644 --- a/reference/array/functions/array-intersect.xml +++ b/reference/array/functions/array-intersect.xml @@ -1,13 +1,13 @@ - - + array_intersect Computes the intersection of arrays - - Description + + + &reftitle.description; arrayarray_intersect arrayarray1 @@ -20,6 +20,50 @@ that are present in all the arguments. Note that keys are preserved. + + + + &reftitle.parameters; + + + + array1 + + + The array with master values to check. + + + + + array2 + + + An array to compare values against. + + + + + array + + + A variable list of arrays to compare. + + + + + + + + + &reftitle.returnvalues; + + Returns an array containing all of the values in + array1 whose values exist in all of the parameters. + + + + + &reftitle.examples; <function>array_intersect</function> example @@ -45,6 +89,10 @@ Array + + + + &reftitle.notes; Two elements are considered equal if and only if @@ -53,10 +101,16 @@ Array + + + + &reftitle.seealso; - See also array_intersect_assoc, - array_diff, and - array_diff_assoc. + + array_intersect_assoc + array_diff + array_diff_assoc + diff --git a/reference/array/functions/array-key-exists.xml b/reference/array/functions/array-key-exists.xml index 428a53f87b..1a61e1d3d9 100644 --- a/reference/array/functions/array-key-exists.xml +++ b/reference/array/functions/array-key-exists.xml @@ -1,13 +1,13 @@ - - + array_key_exists Checks if the given key or index exists in the array - - Description + + + &reftitle.description; boolarray_key_exists mixedkey @@ -20,6 +20,41 @@ for an array index. array_key_exists also works on objects. + + + + &reftitle.parameters; + + + + key + + + Value to check. + + + + + search + + + An array with keys to check. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; <function>array_key_exists</function> example @@ -62,10 +97,16 @@ array_key_exists('first', $search_array); ]]> + + + + &reftitle.seealso; - See also isset, - array_keys, and - in_array. + + isset + array_keys + in_array + diff --git a/reference/array/functions/array-keys.xml b/reference/array/functions/array-keys.xml index 837eb48199..282f6627b6 100644 --- a/reference/array/functions/array-keys.xml +++ b/reference/array/functions/array-keys.xml @@ -1,13 +1,13 @@ - - + array_keys Return all the keys of an array - - Description + + + &reftitle.description; arrayarray_keys arrayinput @@ -25,6 +25,50 @@ As of PHP 5, you can use strict parameter for comparison including type (===). + + + + &reftitle.parameters; + + + + input + + + An array containing keys to return. + + + + + search_value + + + If specified, then only keys containing these values are returned. + + + + + strict + + + As of PHP 5, this parameter is for if strict comparision (===) should be + used. + + + + + + + + + &reftitle.returnvalues; + + Returns an array of all the keys in input. + + + + + &reftitle.examples; <function>array_keys</function> example @@ -66,9 +110,15 @@ Array + + + + &reftitle.seealso; - See also array_values and - array_key_exists. + + array_values + array_key_exists + diff --git a/reference/array/functions/array-map.xml b/reference/array/functions/array-map.xml index 1a4779f88c..0f6ac91d36 100644 --- a/reference/array/functions/array-map.xml +++ b/reference/array/functions/array-map.xml @@ -1,13 +1,13 @@ - - + array_map Applies the callback to the elements of the given arrays - - Description + + + &reftitle.description; arrayarray_map callbackcallback @@ -23,6 +23,51 @@ should match the number of arrays passed to the array_map + + + + &reftitle.parameters; + + + + callback + + + Callback function to run for each element in each array. + + + + + arr1 + + + An array to run through the callback function. + + + + + array + + + Variable list of array arguments to run through the + callback function. + + + + + + + + + &reftitle.returnvalues; + + Returns an array containing all the elements of arr1 + after applying the callback function to each one. + + + + + &reftitle.examples; <function>array_map</function> example @@ -57,6 +102,10 @@ Array + + + + &reftitle.examples; <function>array_map</function> - using more arrays @@ -202,12 +251,18 @@ Array + + + + &reftitle.seealso; - See also array_filter, - array_reduce, - array_walk, - create_function, and - &seealso.callback;. + + array_filter + array_reduce + array_walk + create_function + + &seealso.callback; diff --git a/reference/array/functions/array-merge-recursive.xml b/reference/array/functions/array-merge-recursive.xml index bafc814d5f..eec3772ef8 100644 --- a/reference/array/functions/array-merge-recursive.xml +++ b/reference/array/functions/array-merge-recursive.xml @@ -1,13 +1,13 @@ - - + array_merge_recursive Merge two or more arrays recursively - - Description + + + &reftitle.description; arrayarray_merge_recursive arrayarray1 @@ -26,6 +26,41 @@ too. If, however, the arrays have the same numeric key, the later value will not overwrite the original value, but will be appended. + + + + &reftitle.parameters; + + + + array1 + + + Initial array to merge. + + + + + array + + + Variable list of arrays to recursively merge. + + + + + + + + + &reftitle.returnvalues; + + An array of values resulted from merging the arguments together. + + + + + &reftitle.examples; <function>array_merge_recursive</function> example @@ -62,8 +97,14 @@ Array + + + + &reftitle.seealso; - See also array_merge. + + array_merge + diff --git a/reference/array/functions/array-pad.xml b/reference/array/functions/array-pad.xml index aa122c0b29..232018b6c5 100644 --- a/reference/array/functions/array-pad.xml +++ b/reference/array/functions/array-pad.xml @@ -1,13 +1,13 @@ - - + array_pad Pad array to the specified length with a value - - Description + + + &reftitle.description; arrayarray_pad arrayinput @@ -26,6 +26,55 @@ padding takes place. It is possible to add most 1048576 elements at a time. + + + + &reftitle.parameters; + + + + input + + + Initial array of values to pad. + + + + + pad_size + + + New size of the array. + + + + + pad_value + + + Value to pad if input is less than + pad_size. + + + + + + + + + &reftitle.returnvalues; + + Returns a copy of the input padded to size specified + by pad_size with value + pad_value. If pad_size is + positive then the array is padded on the right, if it's negative then + on the left. If the absolute value of pad_size is less than or equal to + the length of the input then no padding takes place. + + + + + &reftitle.examples; <function>array_pad</function> example @@ -47,9 +96,14 @@ $result = array_pad($input, 2, "noop"); + + + &reftitle.seealso; - See also array_fill and - range. + + array_fill + range + diff --git a/reference/array/functions/array-pop.xml b/reference/array/functions/array-pop.xml index a5d7da1236..3793da64e9 100644 --- a/reference/array/functions/array-pop.xml +++ b/reference/array/functions/array-pop.xml @@ -1,13 +1,13 @@ - - + array_pop Pop the element off the end of array - - Description + + + &reftitle.description; mixedarray_pop arrayarray @@ -19,9 +19,36 @@ If array is empty (or is not an array), &null; will be returned. - &array.resetspointer; + + + &reftitle.parameters; + + + + array + + + The array to get the value from. + + + + + + + + + &reftitle.returnvalues; + + Returns the last value of array. + If array is empty (or is not an array), + &null; will be returned. + + + + + &reftitle.examples; <function>array_pop</function> example @@ -53,6 +80,10 @@ Array + + + + &reftitle.seealso; See also array_push, array_shift, and