1.

How to change array index in PHP?

Answer»

$array = array('1' => 'best', '2' => 'interview', '3' => 'question')
$array[3] = $array[5];
unset($array[3]);

// OUTPUT
array('1' => 'best', '2' => 'interview', '5' => 'question')



Discussion

No Comment Found