Answers for "reset keys in array php"

PHP
2

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
0

reset array keys php

foreach($input as &$val) {
   $val = array_values($val);
}
Posted by: Guest on May-19-2020

Browse Popular Code Answers by Language