Re: retrieve top n entries from an associative array
- From: "ZeldorBlat" <zeldorblat@xxxxxxxxx>
- Date: 30 Dec 2006 05:26:19 -0800
duzhidian@xxxxxxxxx wrote:
Hello,
After sorting an associative array by value, how can I retrieve top n
entries from it?
Thanks.
Zhidian Du
$a = array(...); //some sorted array
$b = array();
for($i = 0; $i < 10; $i++)
$b[] = $a[$i];
.
- References:
- retrieve top n entries from an associative array
- From: duzhidian@xxxxxxxxx
- retrieve top n entries from an associative array
- Prev by Date: Re: [PHP] Chocked
- Next by Date: Re: help with \n\r in strings
- Previous by thread: retrieve top n entries from an associative array
- Next by thread: Re: retrieve top n entries from an associative array
- Index(es):
Relevant Pages
|