Answers for "php remove item from array by valuephp in_array"

PHP
17

php delete array item by value

$colors = array("blue","green","red");

//delete element in array by value "green"
if (($key = array_search("green", $colors)) !== false) {
    unset($colors[$key]);
}
Posted by: Guest on October-30-2019
0

remove array values php

array_splice(array, start, length, array)
Posted by: Guest on November-03-2020

Code answers related to "php remove item from array by valuephp in_array"

Browse Popular Code Answers by Language