I have an array looking like this:
552="text"
75="text"
120="text"
1254="text"
187="text"
...
I want to use array_slice() on it to get the first 3 element values and implode them but since the keys are random, array_slice() doesn't seem to work with this because i don't know the keys.
$list_sliced = array_slice($list, $slice_from, $slice_to);
$u_array[] = implode(',', $list_sliced);
How can i get the first 3 element values of an array with random keys?
EDIT: I actually found a solution by using this before I slice my array $new_array = array_values($old_array);