Answers for "php unset php array where value"

PHP
17

php delete element 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
3

php unset

// Destroy a variable
<?php
unset ($var1, $var2.... )
?>
Posted by: Guest on April-14-2020

Browse Popular Code Answers by Language