Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Array Sorting

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Array Sorting

Postby bonkers » Wed Jun 04, 2003 5:33 pm

How can I sort an array with this information by number.
It's a 2d array, containing information like this:

Array
(
[1] => Array
(
[0] => 2
[1] => 1
[2] => 3
[3] => 1
[4] => 1
)

[0] => Array
(
[0] => http://www.extremeautofest.com
[1] => http://www.hondahookup.com
[2] => http://www.carandmodel.com
[3] => http://www.cardomain.com
[4] => http://www.importtuner.com
)

)

I want to rearrange it so that the corralating URL (like http://www.extremeautofest.com/ is to 2) is sorted by how big each one, the one with the largest number at the top. Is this possible with any of the array functions?
bonkers
New php-forum User
New php-forum User
 
Posts: 46
Joined: Wed Mar 12, 2003 7:17 pm

Re: Array Sorting

Postby WiZARD » Thu Jun 05, 2003 1:57 am

User avatar
WiZARD
Moderator
Moderator
 
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 4 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.