laravel/laravel — pull request #1044 by JeffreyWay (2012-08-02 15:29:59+00:00)
Title: Add simple array item removal support to array_forget

This is a small push. Right now, `array_forget` will only remove items using dot notation, like:

```php
$array = array(
'name' => array(
'first' => 'Joe',
'last' => 'Johnson'
)
);

array_forget($array, 'name.last');
```

But, it would also be nice if you could simply remove single items from a simple array too - just for convenience. Like this:

```php
$array = array('joe', 'bob', 'jane', 'jack');
array_forget($array, 'jane'); // joe, bob, jack
```

Currently, you can't, but this commit allows for that.

Signed-off-by: Jeffrey Way