每周添加一个值

I wanted to see if I can change the value number of several texts weekly without the use of a database. Just with the use of PHP

For instance, on the website you see the following

  • Game 265
  • Game 264
  • Game 263
  • Game 262

1 Week later I want the numbers to add 1 and change to

  • Game 266
  • Game 265
  • Game 264
  • Game 263

Perhaps you could do this by counting the number of weeks between the current date and some arbitrary date in the past. So, since today is 5/21/2012, if you counted the weeks since 5/7/2012 you would get 2. If you wanted to start the counting at 266 you could do: $weeksSinceDate + 264

::UPDATE:: In response to your question, here is some code you could use:

$counterStartNum = 266;
$date1 = new DateTime("2012-05-21");
$date2 = new DateTime();
$interval = $date1->diff($date2);
$weeksSinceDate = $interval->d / 7;
$currentCounter = $counterStartNum + $weeksSinceDate;