php array_filter without key preservation May 6, 2023 by Tarik You could use array_values after filtering to get the values.