From 09518063e18deed5b823151c86055407e5ec6bb9 Mon Sep 17 00:00:00 2001 From: Jeroen van Wolffelaar Date: Fri, 21 Sep 2001 23:02:13 +0000 Subject: [PATCH] Fix array_flip description on value requirments and what-if-that-isn't-the-case. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@57994 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/array.xml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/functions/array.xml b/functions/array.xml index 0c816e8ba5..3fb4c38199 100644 --- a/functions/array.xml +++ b/functions/array.xml @@ -1,5 +1,5 @@ - + Array Functions Arrays @@ -294,12 +294,16 @@ $even_arr = array_filter($array2, "even"); - array_flip returns an array in flip order, - i.e. keys from trans become values and + array_flip returns an array in flip + order, i.e. keys from trans become values and trans's values become keys. - Note that array_flip works only with string - and integer values, and it will display an alert if it detects - invalid key or value (array, double, object, boolean). + + + Note that the values of trans need to be valid + keys, i.e. they need to be either integer or + string. A warning will be emitted if a value has the wrong + type, and the key/value pair in question will not be + flipped. If a value has several occurences, the latest key will be