Just wondering how I would select the closest variable.
I have a set list of military times, i.e:
0030
0100
0130
0200
etc…
All in half hour increments. How would I select the closest time to now.
For example.
User clicks on the button, php gets the time it is now, and selects the closest time variable. So if it’s 0144, it would pick 0130. and if it’s 0146, it would pick 0200.
I believe this should do it:
Could probably be improved though.