remove field from array php code example
Example 1: php remove item array
$items = ['banana', 'apple'];
unset($items[0]);
var_dump($items); // ['apple']
Example 2: remove array values php
array_splice(array, start, length, array)
$items = ['banana', 'apple'];
unset($items[0]);
var_dump($items); // ['apple']
array_splice(array, start, length, array)