On 31 August 2010 17:49, Richard Quadling <[email protected]> wrote:
> On 31 August 2010 17:39, Richard Quadling <[email protected]> wrote:
>> On 31 August 2010 17:06, Tontonq Tontonq <[email protected]> wrote:
>>> Array
>>> (
>>> [300] => 300
>>> [301] => 301
>>> ...
If you add a ...
sort($data) ...
just before the foreach() loop...
Array
(
[0] => 101
[1] => 165-173
[2] => 201-215
[3] => 300-316
[4] => 987
)
Watch out for duplicate values.
I changed 315 and 316 to 305 and 306...
unsorted ...
Array
(
[0] => 300-314
[1] => 165-173
[2] => 201-215
[3] => 101
[4] => 305-306
[5] => 987
)
sorted ...
Array
(
[0] => 101
[1] => 165-173
[2] => 201-215
[3] => 300-305
[4] => 305-306
[5] => 306-314
[6] => 987
)
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php