PHP - How to delete a element from an ARRAY

Publicado em: 11 Dezembro 2016
no canal de: Programers Point
479
2

There are different ways to delete an array element, where some are more useful for some specific tasks than others.

Delete one array element

If you want to delete just one array element you can use unset().

unset method()

Note that when you use unset() the array keys won't change/reindex. If you want to reindex the keys you can use array_values() after unset() which will convert all keys to numerical enumerated keys starting from 0.


Nesta página do site você pode assistir ao vídeo on-line PHP - How to delete a element from an ARRAY duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Programers Point 11 Dezembro 2016, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 479 vezes e gostou 2 espectadores. Boa visualização!