我有時間這樣在數據庫轉換時間可讀格式
[open_time] => 10:00:00
[close_time] => 23:00:00
我想把它轉換成可讀格式如上午10:00下午11:00
我嘗試這樣做:
$open = date("g:s a",$time['open_time']);
$close = date("g:sa",$time['close_time']);
,我發現了以下錯誤:
A non well formed numeric value encountered