Jump to content

Need to modify this code....


longhollow

Recommended Posts

Hi,

 

I'm not a php guy.  Several months ago folks here suggested the code below.  It has been working very well. 

It displays 5 lines of content, url links, from stored .txt files.  Each day a new line is added and one falls off.

 

<?php

for($i=1; $i>=-3; $i--) {

$today = date("z",(time()-3600))+$i;

?>

  -   <? INCLUDE "/usr/home/bcmurray/public_html/features/$today.txt";?> <BR>

<?php

}

?>

 

Now my users have asked me to offer a new page that shows an archive of my past url links. 

 

So, I need to modify the code to display all the url links for the year.  It needs to start counting backwards from todays date and stop on day 1.

 

Any help would be greatly appreciated.

 

Thanks,

Bruce

Link to comment
Share on other sites

Thanks for the suggestion.  I had already tried that....

 

Need it to only show this years entries, counting backwards from todays date to day "1".

 

Suggested script breaks as it passes day "1" and starts requesting negative file numbers.

 

Thanks,

Bruce

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.