Does anyone know a simple way to delete a key/value pair from an array? (so that a "foreach" loop won't encounter the key/value pair)
I've checked the PHP docs, and couldn't find a function to do this. The best I can come up with currently is:
- count over array keys
- break when key found
- use array_splice with key location to remove key/value pair
Is there a simpler way to do this? i.e. array_delete_key($key)