Coffeehouse Post

Single Post Permalink

View Thread: Brilliant Code! Got Some?
  • User profile image

    W3bbo said:
    I executed the PHP... it's just a list of days, clicking on a link doesn't actually do anything other than reload the page.

    This is under PHP5 though. Does your script make use of any PHP4-specific behaviour?
    It's not suppose to do anything other than list days. Something that could have been done like this:

    $list = "";
    for ($i = 0; $i < date('t"); $i++) {
      $list .= "<a href='pointlessCode.php?day={$i}' title='Day {$i}'>Day {$i}</a>, ";
    print $list;

    As for any PHP4-Specific behaviour, not sure. I think all of the code is ambiguous. No PHP OO activity or anything. No usage of $_SESSION...I think  it's all cross-compat with 4 and 5 Wink

    Somebody actually wanted a solution over at DevShed. They wanted links for days 1 - n of the current month. This was a joke-solution (although a functional one) for their problem. I thought it was funny Tongue Out

    I was mostly curious if anybody here had every done anything similar as a joke.