Re: Array Question

From: Date: Thu, 13 Sep 2001 18:36:41 +0000
Subject: Re: Array Question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-67256@lists.php.net to get a copy of this message
see array_slice() http://php.net/manual/en/function.array-slice.php regards, philip olson On Thu, 13 Sep 2001, dhardison wrote: > 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 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#67256) next »