Method: a::remove

Removes an element from an array

Info

Syntax

a::remove($array, $search, $key=true)

Parameters

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'
// );