I unset all the even index values from my array using this:
foreach($arr as $key => $value) if(!($key&1)) unset($arr [$key]);
and when I print the array structure using print_r()
I get:
Array ( [1] => name1 [3] => name2 )
How to reindexing after filtering my array so the structure would be:
Array ( [0] => name1 [1] => name2 )