Answers for "Solution for unseting an array"

PHP
0

Solution for unseting an array

$arr = array(1, 2, 3, 4);
foreach ($arr as &$value) {
    $value = $value * 2;
}
unset($value);   // $value no longer references $arr[3]
Posted by: Guest on May-20-2021

Code answers related to "Solution for unseting an array"

Browse Popular Code Answers by Language