-1

I'm using unset function for removing element from array but it aslo removes array index number as well. is there any solution ??

  $arr = array("ex1 ","ex2 ", "ex3 "); unset($arr[1]); print_r($arr);

it's returning this output.

Array ( [0] => ex1 [2] => ex3 ) 

0 Answers0