Re: Array Sorting
| From: | Mark Clarkstone | Date: | Thu, 19 Jun 2003 09:08:52 +0000 |
| Subject: | Re: Array Sorting | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-152127@lists.php.net to get a copy of this message | ||
I found this Great PHP Starter site check it out
http://www.htmlite.com/PHPintro.php
"Ashley M. Kirchner" <ashley@pcraft.com> wrote in message
news:3EF179E6.6030309@pcraft.com...
>
> I have an array that looks like this:
>
> $i = 0;
> $item[$i] = array( 'link' =>
> 'http://...',
> 'image' => '/images/image.jpg',
> 'title' => 'some title',
> 'price' => '$14.00',
> 'cat' => 'Frames',
> 'author' => 'Pinochio',
> 'artist' => '',
> 'asin' => '010101',
> 'manufacturer' => 'Post'
> ); $i++;
> $item[$i] = array( 'link' =>
> 'http://...',
> 'image' => '/images/something.jpg',
> 'title' => 'this is fun',
> 'price' => '$2.99',
> 'cat' => 'Card',
> 'author' => 'Mickey',
> 'artist' => '',
> 'asin' => '1116221',
> 'manufacturer' => 'Kraft'
> ); $i++;
> etc., etc.
>
>
> I would like to sort $items based on the manufacturer of each array
> within. So that, in the above example, the second one would come before
> the first. Is there a way to do that?
>
> --
> H| I haven't lost my mind; it's backed up on tape somewhere.
> +--------------------------------------------------------------------
> Ashley M. Kirchner <mailto:ashley@pcraft.com> .
> 303.442.6410 x130
> IT Director / SysAdmin / WebSmith . 800.441.3873 x130
> Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6
> http://www.pcraft.com ..... . . . Boulder, CO
> 80303, U.S.A.
>
>
>