Array Question
| From: | dhardison | Date: | Thu, 13 Sep 2001 18:15:39 +0000 |
| Subject: | Array Question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-67254@lists.php.net to get a copy of this message | ||
Hi,
I've got an array of items that I've sorted in descending order. I'd
like to select the first ten items only from the array to place in a graph
that's generated later in the script. Here's a sample array I'm trying to
work with.
Array
(
[209.181.49.x] => 2
[64.225.143.x] => 2
[63.174.69.x] => 1
[207.217.120.x] => 1
[164.109.19.x] => 1
[205.197.83.x] => 1
[24.155.23.x] => 1
[24.237.4.x] => 1
[161.58.135.x] => 1
[216.33.156.x] => 1
[64.14.48.x] => 1
[64.38.239.x] => 1
[203.155.4.x] => 1
[204.176.182.x] => 1
[64.12.136.x] => 1
[208.7.216.x] => 1
[64.70.22.x] => 1
[63.225.237.x] => 1
[205.197.83.x] => 1
[209.67.135.x] => 1
[64.14.48.x] => 1
[205.197.83.x] => 1
[206.67.234.x] => 1
)
How could I grab the first ten pairs and store them for use later in the
script?
Thanks,
dhardison