I have an array like this
$arr = array('10', '12', '10', '15', '18', '18', '7', '18', '18', '15');
Four times the value 18. I need to extract only one value, example one 18, and it goes like this:
$arr = array('10', '12', '10', '15', '18', '7', '18', '18', '15');
And with any other number up to zero and no more number, example 18, there is no limit on numbers.
As if it were a shopping cart logic
I have 10 products number 18, if I remove one at a time, the number 18 goes out of the array
I hope it has become clearer now