php include help (with date function)?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nadanada
    Confirmed User
    • Apr 2004
    • 330

    #1

    php include help (with date function)?

    I'm rusty with php, so I don't even know if this can be done. is there a way to use the date function in the page url for the include?

    I know you can replace words with the date function to retrieve a file, example:

    <img src="<? echo(date('M'))?>.jpg" />

    so is it possible to do something like:

    <?php include "<? echo(date('M'))?>.php"; ?>

    thanks!
  • FlexxAeon
    Confirmed User
    • May 2003
    • 3765

    #2
    if i understand you correctly, i think it would be more like

    <?php include date('M').".php"; ?>

    edit: which would try to include Jun.php (for this month)
    Last edited by FlexxAeon; 06-09-2006, 08:49 PM.
    flexx [dot] aeon [at] gmail

    Comment

    • nadanada
      Confirmed User
      • Apr 2004
      • 330

      #3
      I love you.

      I cannot express enough thanks! I kept putting the first " in the wrong place. you have cured me of my 6 hour headache!!

      Comment

      • FlexxAeon
        Confirmed User
        • May 2003
        • 3765

        #4
        haha.....no problem. i've had many a stressful night fighting with php for hours trying to get something to work right. as a matter of fact....i think tonite will be one of them
        flexx [dot] aeon [at] gmail

        Comment

        • CaptainHowdy
          Too lazy to set a custom title
          • Dec 2004
          • 94730

          #5
          Originally posted by FlexxAeon
          haha.....no problem. i've had many a stressful night fighting with php for hours trying to get something to work right. as a matter of fact....i think tonite will be one of them
          I feel for ya... !!

          Comment

          Working...