note 89342 deleted from function.array-count-values by thiago

From: Date: Wed, 04 Mar 2009 11:45:53 +0000
Subject: note 89342 deleted from function.array-count-values by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-151442@lists.php.net to get a copy of this message
Note Submitter: mark - dynom ! nl ---- @psbauman This is incorrect (on 5.2.8), since: <?php $a = array("005","005", "006"); $b = array_count_values($a); var_dump($a, $b); ?> yields: array(4) { [0]=>string(3) "005" [1]=>string(3) "005" [2]=>string(3) "006" } array(3) { ["005"]=>int(2) ["006"]=>int(1) } Without quotes the leading zeros dissapear. However this has nothing to do with array_count_values(). <?php echo 001; // 1 ?>

« previous php.notes (#151442) next »