Answers for "php remove value from variable"

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

Code answers related to "php remove value from variable"

Browse Popular Code Answers by Language