You would be looking for array_unique function, many array functions are listed here:
PHP: array_unique - Manual
<?php
$arr = Array
(
"0" => "15:30",
"1" => "20:45",
"2" => "20:45",
"3" => "20:45",
"4" => "20:45",
"5" => "21:00",
"6" => "21:00",
"7" => "21:00",
"8" => "14:30",
"9" => "18:00",
"10" => "20:00"
);
print_r(array_unique($arr));
Result:
Array
(
[0] => 15:30
[1] => 20:45
[5] => 21:00
[8] => 14:30
[9] => 18:00
[10] => 20:00
)You can filter the array through sort, if the array keys are important to you (they will be shuffled)
Be sure to read the updated
FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us
why or
what errors occurred.