Re: [PHP] Re: Array Sorting Headaches

2004-04-19 Thread Burhan Khalid
Torsten Roehr wrote: Burhan Khalid [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Greetings everyone : Having a hard time with this one. I have a multi-dim array $foo[$x][$y]['key'], where $x and $y are numeric. Here is some sample data [ snipped ] I need to filter the results so

Re: [PHP] Re: Array Sorting Headaches

2004-04-19 Thread Torsten Roehr
Burhan Khalid [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Torsten Roehr wrote: Burhan Khalid [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Greetings everyone : Having a hard time with this one. I have a multi-dim array $foo[$x][$y]['key'], where $x and $y

Re: [PHP] Re: Array Sorting Headaches

2004-04-19 Thread Burhan Khalid
Torsten Roehr wrote: Burhan Khalid [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Torsten Roehr wrote: Burhan Khalid [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Greetings everyone : Having a hard time with this one. I have a multi-dim array $foo[$x][$y]['key'], where

Re: [PHP] Re: Array Sorting Headaches

2004-04-19 Thread Torsten Roehr
Well, it does some sorting, but not quite what I'm after :( I've managed to get the list so that all the (sub) entries are sorted in the correct order. Now its just a matter of finding the highest expire date for /each/ domain, and delete the other entries for that domain. So, in the end,

Re: [PHP] Re: Array Sorting Headaches

2004-04-19 Thread Burhan Khalid
Torsten Roehr wrote: Well, it does some sorting, but not quite what I'm after :( I've managed to get the list so that all the (sub) entries are sorted in the correct order. Now its just a matter of finding the highest expire date for /each/ domain, and delete the other entries for that domain.

Re: [PHP] Re: Array Sorting Headaches

2004-04-19 Thread Torsten Roehr
OK, so it's just the other way round - I see. Instead of deleting the entry with the highest expiry date we delete all the others: foreach ($foo as $key = $value) { $tempArray = array(); foreach ($value as $subkey = $subvalue) { // add

[PHP] Re: Array Sorting Headaches

2004-04-18 Thread Torsten Roehr
Burhan Khalid [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Greetings everyone : Having a hard time with this one. I have a multi-dim array $foo[$x][$y]['key'], where $x and $y are numeric. Here is some sample data : Array ( [$x] = Array ( [0] =