On Friday 17 May 2002 21:20, Josh Edwards wrote:
> Here's a sample of a weblog. I have a loop that extracts the request ie
> "Get /A1.php
> How do I  get the top ten requests and how many time these were requested
> after looping thru the whole file. Can you set up an array that is self
> populating if a string doesn't match an element in the array or is there a
> better way?
> - - [08/May/2002:21:21:07 +1000] "GET /A1.php
> HTTP/1.1" 200417 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)"
> Any help is greatly appreciated.

The manual is always the best help. It's an array problem so look in the 
chapter about arrays. There you'll see a function called 
array_count_values(). Whilst you're there you may want to read up on what 
other array functions may be useful to you.

Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

Man is a rational animal who always loses his temper when he is called upon
to act in accordance with the dictates of reason.
                -- Oscar Wilde

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

Reply via email to