Deleting an element from an array in PHP
Asked 07 September, 2021
Viewed 961 times
  • 52
Votes

Is there an easy way to delete an element from an array using PHP, such that foreach ($array) no longer includes that element?

I thought that setting it to null would do it, but apparently it does not work.

26 Answer