Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   PHP (https://www.askmehelpdesk.com/forumdisplay.php?f=454)
-   -   [php] unexpected T_STRING error (https://www.askmehelpdesk.com/showthread.php?t=649052)

  • Apr 7, 2012, 04:38 AM
    BAV0
    [php] unexpected T_STRING error
    why does $visitdate = date(d/m/Y h:i:s A O); results in an unexpected T_STRING error?
  • May 30, 2012, 05:25 PM
    bobobeer
    Try this:

    Code:

    $visitdate = date('d/m/Y h:i:s A O');
    You need to pass in a string as the date functions parameter, so add some quotes around what you are passing in to make it a string.

    For more on this function please refer to PHP: date - Manual

  • All times are GMT -7. The time now is 07:54 PM.