Method: a::remove
Removes an element from an array
Info
Syntax
a::remove($array, $search, $key=true)
Parameters
- $array (array) The source array
- $search (mixed) The value or key to look for
- $key (boolean) Pass true to search for an key, pass false to search for an value.
Return (array)
The result array without the removed element
Example
$array = array(
'cat' => 'miao',
'dog' => 'wuff',
'bird' => 'tweet'
);
$array = a::remove($array, 'cat');
// array is now: array(
// 'dog' => 'wuff',
// 'bird' => 'tweet'
// );