Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 07-07-2003, 07:22 AM   #1
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579
Default sort an array in php

hey all

say I have an array that looks like

$ar[0]['page']='home';
$ar[0]['match']=9;
$ar[1]['page']='contact';
$ar[1]['match']=12;
$ar[2]['page']='blah';
$ar[2]['match']=8;

how would I sort this array so that the elements of $ar with the hightest match value get put at the start (and reindexed)

know what I mean?

so it should end up like

$ar[0]['page']='contact';
$ar[0]['match']=12;
$ar[1]['page']='home';
$ar[1]['match']=9;
$ar[2]['page']='blah';
$ar[2]['match']=8;

Thanks
__________________
Billy
Online Galleries
iPhone Safety App - iStaySafe
Free Flash Video Tutorials
Photo Website Template

Don't email or PM me questions...
Billy T is offline   Reply With Quote
Old 07-07-2003, 08:41 AM   #2
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579
Default

nevermind

cheers
__________________
Billy
Online Galleries
iPhone Safety App - iStaySafe
Free Flash Video Tutorials
Photo Website Template

Don't email or PM me questions...
Billy T is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
loading an object from an array NateVeronica ActionScript 2.0 1 03-30-2004 10:53 PM


All times are GMT. The time now is 10:31 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.