PHP Date - How to add a string to separate date and time
you need to escape the a
and t
as both have special meaning when used as formatting options in date()
echo date('M j \a\t h:i a');
See it in action
Try
<?php
echo date('M j \a\t h:i a');
?>
OR
<?php
echo date('M j'). "at". date(' h:i a');
?>
You need to escape the t
too:
echo date('M j \a\t h:i a');