I have a form on my website which allows a user to select a time.
when the user posts the time - it is currently posting as 12:00 PM
What is the best way to remove the PM or the AM from $eventtime
and replace it with :00
I am using a timepicker jquery plugin, which automatically adds the AM / PM.
And my PHP converts the selected date and time into a timestamp.
My html element
<input type="text" id="booking-time1" name ="selectedtime" value="" />
PHP
$eventdate = $this->input->post('selecteddate');
$eventtime = $this->input->post('selectedtime');
$timestamp = strtotime(''.$eventdate.' '.$eventtime.'');