Saturday, May 26, 2018

How do I remove all elements with a particular value from a php array? (in the shortest way possible)

For instance:



$array = ["a", "b", "c", "a", "a"];


I want to remove all "a" elements to get output:




$array = ["b", "c"];


Should also work for ints and floats.Thanks guys!

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...