I have an associative array in the form key => value where key is a numerical value, however it is not a sequential numerical value. The key is actually an I
key => value
this code will help to change the oldkey to new one
$i = 0; $keys_array=array("0"=>"one","1"=>"two"); $keys = array_keys($keys_array); for($i=0;$i
display like
$keys_array=array("one"=>"one","two"=>"two");