Question: Need help writing a php code that can read a text file and sort an array that displays the min, max, average, and standard deviation
Need help writing a php code that can read a text file and sort an array that displays the min, max, average, and standard deviation and shows up on an html.
The array that needs to be in a txt file
1,2,3,4,5,6,7,8,9 345,23,346,234,234,456,756,345,123 456,0,234,234,45,678,789,70,436,342,234,345,35 5,5,5,5,5,5,5
It should look like this
| Row | Min | Max | Avg | Stdev |
|---|---|---|---|---|
| 1 | 1 | 9 | 5 | 2.5819888974716 |
| 2 | 23 | 756 | 318 | 197.84730363479 |
| 3 | 0 | 789 | 299.84615384615 | 235.31381539548 |
| 4 | 5 | 5 | 5 | 0 |
and here is my code
echo "";
echo "
| Row | Min | Avg | std_dev | :;|
|---|---|---|---|---|
| Test | ";Min | ";Max | ";Avg | ";Stddev | ";
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
