Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Date [Resolved]

  1. #1
    New Coder
    Join Date
    Aug 2006
    Location
    3943'N to 42N Latitude, 7443'W to 8031'W Longitude
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Date [Resolved]

    I am having am recieving a simple PHP error. The error I am recieving is:
    Code:
    Parse error:  syntax error, unexpected T_ECHO in /home/xtremeup/public_html/ipn.php on line 79
    Here is my code at line 79:
    PHP Code:
    $date = echo date('l, F jS, Y @ g:i:s A e'); 
    If I'm correct, this should echo for example: Monday, January 1st, 2006 @ 12:00:00 AM EST. Any ideas? Thanks!



    Edit: I have gotten this to work. All I did was put the variable in quotes... For example:
    PHP Code:
    $date "echo date('l, F jS, Y @ g:i:s A e')"
    Thanks anyways!
    Last edited by getlowdogg369; 08-21-2006 at 10:30 PM.
    Jason Weinberg

  • #2
    Regular Coder
    Join Date
    May 2006
    Posts
    106
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Don't use the echo function in the variable assignment

    PHP Code:
    $date date('l, F jS, Y @ g:i:s A e'); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •