How to convert the time from AM/PM to 24 hour format in PHP?
If you use a Datetime format see http://php.net/manual/en/datetime.format.php
You can do this :
$date = new \DateTime();
echo date_format($date, 'Y-m-d H:i:s');
#output: 2012-03-24 17:45:12
echo date_format($date, 'G:ia');
#output: 05:45pm
Try with this
echo date("G:i", strtotime($time));
or you can try like this also
echo date("H:i", strtotime("04:25 PM"));