Posted By

KrisBaur on 08/13/11


Versions (?)

Remove Item From Array

 / Published in: PHP

  1. $array = array_values(array_diff($array,array('valueToRemove')));

Report this snippet  


RSS Icon Subscribe to comments
Posted By: AngelaKinsey52 on January 9, 2019

One operation that seems to be more complex than it should be in every programming language is shifting value from an array. It's such an ...The correct method to remove an item from an array is to use splice(). It takes an index and amount of objects to delete starting from that index. 1 > var array = ["a", "b", ... essay writing websites

You need to login to post a comment.