diff --git a/README.md b/README.md index b920d06..d7906f5 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,15 @@ # median Super simple PHP library for getting the median of array values (also returns the avg of the array +```php +$arrayOfValues = [1, 2, 5, 1000, 7] +$m = new Median($arrayOfValues); + +$avh = $m->average(); +// $avh == 203 + +$median = $m->median(); +// $median == 5 +``` + +