rearrange array by key number code example Example: rearrange array index php $array = array_values($input);