Jump to content

Ordering Numbers


ssjskipp

Recommended Posts

I've got a list of about 350+ numbers, and there' in the 700-800's, but I'd like to know how to do a ffew things:
Order them form least to greatest
AND // OR
Count how many times each number appears, and display the results.

How would I go about doing this?
Link to comment
Share on other sites

[!--quoteo(post=351783:date=Mar 5 2006, 04:35 AM:name=Barand)--][div class=\'quotetop\']QUOTE(Barand @ Mar 5 2006, 04:35 AM) [snapback]351783[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Put them into an array.

To put them in order, [a href=\"http://www.php.net/sort\" target=\"_blank\"]http://www.php.net/sort[/a]

To count, [a href=\"http://www.php.net/array_count_values\" target=\"_blank\"]http://www.php.net/array_count_values[/a]
[/quote]

thank you =]
Link to comment
Share on other sites

[!--quoteo(post=351891:date=Mar 5 2006, 04:40 PM:name=Barand)--][div class=\'quotetop\']QUOTE(Barand @ Mar 5 2006, 04:40 PM) [snapback]351891[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Are your 350+ numbers in a database table?
[/quote]

Sadly, no =[!
But I got them sorted and counted, thanks =]

If they were in the database, I'd do something like
SELECT * FROM `table` ORDER BY `num` ASC
or something....
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.