5

How do I echo a date as a string such as 07/18(month/day)?

John
  • 1
  • 13
  • 98
  • 177
Brandy
  • 544
  • 2
  • 11
  • 30

1 Answers1

8
<?php

echo date('m/d');

?>

If you already have the timestamp, just use it in the second parameter:

<?php

echo date('m/d', time());

?>

demo

iautomation
  • 996
  • 10
  • 18