Marek Kilimajer wrote:

Use usort. This function should do the work:

Hey thanks! That worked like a charm, once I figured out that making the comparison < instead of > I would get an ascending sort instead of the descending one. Now, can I do multiple sorts? Like, sort on "cat" first, "manufacturer" next, and "title last"? Here's the array structure again:


$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.

--
H| I haven't lost my mind; it's backed up on tape somewhere.
+--------------------------------------------------------------------
Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 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.






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to