Re: PHP 4.0 Bug #6684: array_reverse() should maintain indices
| From: | André Langhorst | Date: | Tue, 12 Sep 2000 17:49:03 +0000 |
| Subject: | Re: PHP 4.0 Bug #6684: array_reverse() should maintain indices | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-33088@lists.php.net to get a copy of this message | ||
Is maintaining array indices in this case important? Can you give an example?Sure, though I do not understand why keepeing array_indices could not be important... $array=range(30,50); // creating an array where keys=value is a ord=chr relation foreach ($array AS $val) $chr_array[$val]=chr($val); // now I simply want to reverse it $r_array=array_reverse($chr_array); var_dump($r_array); wow, we´ve lost our ord=chr relation, hope it conviced andré