Answers for "php reset values of associative array"

PHP
3

php reset array keys

$arr = array_values($arr)
Posted by: Guest on July-09-2020
0

php remove array element reset keys

unset($foo[0]); // remove item at index 0
$foo2 = array_values($foo); // 'reindex' array
Posted by: Guest on September-23-2020
3

clear array php

//To clear array you are able to simply re-instantiate it
$foo = array();

//To clear $foo from the symbol table use
unset($foo);
Posted by: Guest on July-15-2020

Code answers related to "php reset values of associative array"

Browse Popular Code Answers by Language