babaFreak Posted June 28, 2006 Share Posted June 28, 2006 I am trying to have PHP calculate some sort of percentile that can be passed to flash (I know that part) and flash will display it as a bargraph. What I need help on is calculating the percentile. In my example we have a time for running a distance. I have the time of the current user and the average time of all the times in the database (calculated by adding all the times in the database and dividing by number of records).I need to determine where this user fits in to the mix. Ideally it would be which percentile (by 10s) that this user falls into. The higher the percentile the better. (ex "he is in the 90th percentile)I can retrieve highest and lowest scores if neeed but it would be better if there is some percentage calculation based on this users time compared to the average time - as long as it can be displayed on a bar graph I am in good shape.Thanks,Ryan Quote Link to comment https://forums.phpfreaks.com/topic/13070-php-percentile-script/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.