Rename keys in array PHP -
hey all: have array:
$names = array('a','b','c'); foreach($names $key => $value ) { echo $key; }
where a, b, c
come name[] field
the input is:
0 1 2
there array function replace output result as:
1 2 3
i want rename first key because i'll insert theme mysql table.
why rename? use $key + 1
when needed.
Comments
Post a Comment