I have an array of numbers.... - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Programming > PHP Development

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 02-09-2009, 06:22 AM   #1 (permalink)
Junior Member
 
Join Date: Feb 2009
Posts: 1
Default I have an array of numbers....

hi,

I have an array of numbers and many repeat, how to list all items in order of maximum occurence? Please help me...

Thanks
brucesmith is offline   Reply With Quote
Sponsored Links
Old 02-10-2009, 04:06 AM   #2 (permalink)
Junior Member
 
BlueBoden's Avatar
 
Join Date: Feb 2009
Posts: 53
Default Re: I have an array of numbers....

You should check out the foreach function of php.

PHP: foreach - Manual

An example is included below.
Code:
$a = array(1, 2, 3, 17);

foreach ($a as $v) {
    echo 'Current value of $a is:' . $v ."\n";
}

Last edited by BlueBoden; 02-10-2009 at 04:09 AM.
BlueBoden is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 07:37 PM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting