PHP - Converting an integer to a date time

前端 未结 0 447
一生所求
一生所求 2021-02-05 09:05

I\'m trying to convert a variable with an integer value to a 12 hour format, but It\'s just returning 12 am.

$hour = 18;

echo date(\'h a\', $hour);
相关标签:
回答
  • 消灭零回复
提交回复
热议问题