Topic: Clan war stats function
I was bored today, so I decided to make a function that accepted an array as a parameter and outputs a table and statistics. I am lazy, so I will not provide the full documentation. It's included in the php file. I don't see any bugs, but there might be some (fortunately, my php skills are better than my c++ skills ). Feel free to report bugs and suggest new features. With no space between the lines, the function is 40 lines long, while the whole demo is 68 lines long. I added some whitespace for readability, so feel free to remove it.
Features:
*Heavily commented code
*Lightweight function is 40 lines long w/o whitespace or 1.7 kb
*Whole example file is 68 lines w/o whitespace or 2.3kb
*Depends on no external files/libraries
*Indented code
*Returns valid html
*Supports custom class for the table
*Supports custom table name
*Calculates total wars fought, how many of each outcome there were, and percentages of each outcome.
*Licensed under the CC-BY-NC-SA (url provided in the file) to allow extensions.
Download this and rename it to "clan.php" to use it.
deny_post($poster);