Results 1 to 8 of 8

Thread: last 14 dates [Resolved]

Threaded View

  1. #1

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945

    last 14 dates [Resolved]

    I'm trying to put the last 14 dates of the calender in a dropdown box. I thought you could just subtract a number from the date value, but I guess not. Can someone tell me how to get the last 14 dates into an array? The following doesn't work.

    PHP Code:
    $myarr = array(=> (date("n/j/Y")-14), (date("n/j/Y")-13), (date("n/j/Y")-12), (date("n/j/Y")-11), (date("n/j/Y")-10), (date("n/j/Y")-9), (date("n/j/Y")-8), (date("n/j/Y")-7), (date("n/j/Y")-6), (date("n/j/Y")-5), (date("n/j/Y")-4), (date("n/j/Y")-3), (date("n/j/Y")-2), (date("n/j/Y")-1), date("n/j/Y"));
        
    $i=0;
        for(
    $i=0;$i<15;$i++)
            echo 
    $myarr[$i] . "<br>"
    Last edited by ober0330; Apr 14th, 2004 at 08:28 AM.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

Posting Permissions

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



Click Here to Expand Forum to Full Width