note 70985 deleted from function.array-reverse by salathe
| From: | salathe@php.net | Date: | Fri, 08 Jun 2012 20:07:42 +0000 |
| Subject: | note 70985 deleted from function.array-reverse by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-188503@lists.php.net to get a copy of this message | ||
Note Submitter: rdx at jouwmoeder
----
As response to Ella's note:
$array[0] = 'record1';
$array[9] = 'record2';
$array[15] = 'record3';
That is ordered way easier AND faster with array_values().
array_reverse twice is unnecessary. Once array_values and all values will be saved in new keys