From e17bafd417174af7c0a7a10179610f741a43e231 Mon Sep 17 00:00:00 2001 From: Damien Seguy Date: Tue, 20 Feb 2001 08:13:49 +0000 Subject: [PATCH] added in search_array() prototype. TRUE/FALSE -> literal git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@41534 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/array.xml | 61 ++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/functions/array.xml b/functions/array.xml index bfdaa03ace..c9cac03607 100644 --- a/functions/array.xml +++ b/functions/array.xml @@ -512,7 +512,8 @@ $result = array_merge_recursive ($ar1, $ar2); SORT_REGULAR after before each new array argument. - Returns true on success, false on failure. + Returns TRUE on success, FALSE + on failure. @@ -761,7 +762,7 @@ print $input[$rand_keys[1]]."\n"; Array_reverse takes input array and returns a new array with the order of the elements reversed, preserving the keys if - preserve_keys is true. + preserve_keys is TRUE. @@ -769,7 +770,7 @@ print $input[$rand_keys[1]]."\n"; $input = array ("php", 4.0, array ("green", "red")); $result = array_reverse ($input); -$result_keyed = array_reverse ($input, true); +$result_keyed = array_reverse ($input, TRUE); @@ -1089,7 +1090,7 @@ array_unshift ($queue, "p4", "p5", "p6"); - Array_values returns all the values from the + array_values returns all the values from the input array. @@ -1466,15 +1467,15 @@ $result = count ($a); array element that's currently being pointed by the internal pointer. It does not move the pointer in any way. If the internal pointer points beyond the end of the elements list, - current returns false. + current returns FALSE. If the array contains empty elements (0 or "", the empty - string) then this function will return false for these elements - as well. This makes it impossible to determine if you are - really at the end of the list in such an array using - current. To properly traverse an array - that may contain empty elements, use the + string) then this function will return FALSE + for these elements as well. This makes it impossible to + determine if you are really at the end of the list in such + an array using current. To properly + traverse an array that may contain empty elements, use the each function. @@ -1514,7 +1515,8 @@ $result = count ($a); If the internal pointer for the array points past the end of the - array contents, each returns false. + array contents, each returns + FALSE. @@ -1765,7 +1767,7 @@ blue, large, sphere, medium in_array - Return true if a value exists in an array + Return TRUE if a value exists in an array Description @@ -1779,8 +1781,8 @@ blue, large, sphere, medium Searches haystack for - needle and returns true if it is found in - the array, false otherwise. + needle and returns TRUE + if it is found in the array, FALSE otherwise. If the third parameter strict is set to @@ -1806,9 +1808,9 @@ if (in_array ("Irix", $os)){ @@ -1827,13 +1829,15 @@ if (in_array(1.13, $a, true)) search_array - Searches the array for a given value and returns the corresponding key if successful + + Searches the array for a given value and returns the corresponding key if successful + Description - mixed search_array + mixed search_array mixed needle array haystack bool strict @@ -1842,7 +1846,7 @@ if (in_array(1.13, $a, true)) Searches haystack for needle and returns the key if it is found in - the array, false otherwise. + the array, FALSE otherwise. If the third parameter strict is set to @@ -2180,7 +2184,8 @@ Array Returns the array element in the next place that's pointed by the - internal array pointer, or false if there are no more elements. + internal array pointer, or FALSE if + there are no more elements. Next behaves like @@ -2189,13 +2194,13 @@ Array element. That means it returns the next array element and advances the internal array pointer by one. If advancing the internal array pointer results in going beyond the end of the - element list, next returns false. + element list, next returns FALSE. If the array contains empty elements, or elements that have a key - value of 0 then this function will return false for these elements - as well. To properly traverse an array which may contain empty - elements or elements with key values of 0 see the + value of 0 then this function will return FALSE + for these elements as well. To properly traverse an array which + may contain empty elements or elements with key values of 0 see the each function. @@ -2247,14 +2252,14 @@ Array Returns the array element in the previous place that's pointed by - the internal array pointer, or false if there are no more + the internal array pointer, or FALSE if there are no more elements. If the array contains empty elements then this function will - return false for these elements as well. To properly traverse - an array which may contain empty elements see the - each function. + return FALSE for these elements as well. + To properly traverse an array which may contain empty elements + see the each function.