PHP select closest to variable
<p>Just wondering how I would select the closest variable.
I have a set list of military times, i.e:
0030
0100
0130
0200
etc...</p>

<p>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.</p>
