HomePHP Page 3 - Performing Descriptive Statistical Analysis with PHP
Detailed explanation of the scripts - PHP
Have you ever thought of doing statistical analysis using PHP? Well, as simple as this technology can be, it enables an analyst to do server-side scripting commands which accept data from a web form, and then analyze the data in the server using PHP.
Basically what the form will do is check to see if it is submitted:
if (!$_POST['submit'])
If not, it will show the form; otherwise, it will start processing the data from a form and assign it to an array variable. This array variable, $data, contains all the data needed for PHP statistical analysis.
This is taken from an HTML web form text area. Using the PHP explode function, every piece of data is unique and distinct when separated line by line.
To simplify calculations, PHP functions are defined for average, standard deviation, median and range.