Skip to content

Commit

Permalink
last function returns last element, not first
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwilms committed Jun 1, 2015
1 parent 33eb62a commit 7a32e00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,11 @@ The `head` function simply returns the first element in the given array:
<a name="method-last"></a>
#### `last()` {#collection-method}

The `last` function returns the first element in the given array:
The `last` function returns the last element in the given array:

$array = [100, 200, 300];

$last = head($array);
$last = last($array);

// 300

Expand Down

0 comments on commit 7a32e00

Please sign in to comment.