我去這個錯誤
推薦使用:功能拆分()在
list($hrs,$mins,$secs,$msecs) = split(':',$currenttime);
不贊成我怎麼把它改寫
date_default_timezone_set('US/Eastern');
$currenttime = date('h:i:s A',strtotime($row["orc15"]));
list($hrs,$mins,$secs,$msecs) = split(':',$currenttime);
$tha = date('h:i:s A',strtotime($row["orc15"]." -3 hours"));
文檔中列出了'split'的替代方法:http://php.net/split – ceejayoz
您閱讀了PHP手冊頁[split()](http://php.net/manual/en/function.split .php),然後查看在紅色框 – RiggsFolly
中提到的替代方法或稍後在同一頁面上的TIPS'split()從PHP 5.3.0開始已棄用。 preg_split()是該函數的建議替代方法。如果你不需要正則表達式的能力,那麼使用explode()會更快,這不會導致正則表達式引擎的開銷。 ' – RiggsFolly