I have a time like this in the database
[open_time] => 10:00:00
[close_time] => 23:00:00
I want to convert it to a readable form, for example, 10:00 a.m. 11:00 p.m.
I tried this:
$open = date("g:s a",$time['open_time']);
$close = date("g:sa",$time['close_time']);
I get the following error:
Invalid numeric value
source
share