SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot cachobong's Avatar
    Join Date
    Jan 2005
    Location
    cebu
    Posts
    173
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation more problems about date()

    evrytime i use this:

    PHP Code:
    echo date('H:i',$xtimein);
    echo 
    date('H:i',$xbreakout);
    echo 
    date('H:i',$xbreakin);
    echo 
    date('H:i',$xtimeout);
    echo 
    date('H:i',$xot1);
    echo 
    date('H:i',$xot2); 
    it outputs the same time: 08:00

  2. #2
    SitePoint Guru defiance's Avatar
    Join Date
    Oct 2004
    Location
    United states
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i don quite understand what you are saying.

    Please elaborate more.

  3. #3
    SitePoint Zealot cachobong's Avatar
    Join Date
    Jan 2005
    Location
    cebu
    Posts
    173
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    each of the elements that i echo are supposed to have different value. coz if i echo it without the date funciton they are different but when i use the date function they output the same thing 08:00

  4. #4
    SitePoint Guru defiance's Avatar
    Join Date
    Oct 2004
    Location
    United states
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


    don get you still...


    sorry..

    and what is with the variable in the date function?

  5. #5
    SitePoint Zealot cachobong's Avatar
    Join Date
    Jan 2005
    Location
    cebu
    Posts
    173
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    $xtimein <----contains a strtotime($xtimein) //time from database
    each variable has different values but when i use the date function it outputs only one time, 08:00

  6. #6
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you checked the values of $xtimein to see that strtotime is producing a valid time stamp -- and that each of those stamps are different ?

  7. #7
    SitePoint Guru defiance's Avatar
    Join Date
    Oct 2004
    Location
    United states
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i am sorry

    i think i will have to let the more advanced to help you with this,,,



Bookmarks

Posting Permissions

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