Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mazedlx authored Mar 24, 2017
1 parent 0a98197 commit b78e8d4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```


0 comments on commit b78e8d4

Please sign in to comment.