Function : array_delete

This is used to remove the the relative key of the first occurence of a value in an array

Syntax
  array_delete($array, $value)
  
  $array: array which value is expected to be removed
  $value: value which first occurence is removed from array
   
                  
Sample 1
  $array = [1, 2, 3, 2];

  $array = array_delete($array, 2);

  vdump($array); //[1, 3, 2]
                  
Sample 2
  $array = ['name'=> 'foo', 'class' => 'bar'];

  $array = array_delete($array, 'foo');

  vdump($array); //['class'=>'bar']
                  
To remove the entire occurence of a value see array_unset() documentation