|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-01-28 07:59 UTC] corinl at gmx dot de
http://de.php.net/manual/de/function.array-unique.php the example: $input = array ("a" => "gr?n", "rot", "b" => "gr?n", "blau", "rot"); $result = array_unique ($input); print_r($result); should (and does) print: Array ( [a] => gr?n [0] => rot [1] => blau ) and not: Array ( [b] => gr?n [1] => blau [2] => rot ) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 13:00:02 2025 UTC |
hi! yes, the ourput is correct...but the documentation is wrong, bacause it says the example should output: Array ( [b] => green [1] => blue [2] => red )Yes, the output on my machine is this. I use the CLI binary. c:\apache\php>php-cli a_u.php Array ( [a] => gr?n [1] => blau [2] => rot ) c:\apache\php> AndreyI get: php -v PHP 4.3.0 (cli) (built: Jan 8 2003 16:10:13) Copyright (c) 1997-2002 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies php test.php Array ( [a] => gr?n [0] => rot [1] => blau } Friedhelm