Skip to main content
2 of 2
deleted 99 characters in body
Tom J Nowell
  • 60.6k
  • 7
  • 77
  • 147

You would do it the same way as any other PHP application, this isn't a WordPress problem.

To remove an item from an array in PHP, use unset( thing to remove ).

E.g.

$test = [ 'banana', 'cucumber', 'apple' ];
unset( $test[1] );
// cucumber is no longer in the test array, and the array now has 2 not 3 items
Tom J Nowell
  • 60.6k
  • 7
  • 77
  • 147