Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/28/2020 in all areas

  1. Hi, I should have posted what I have so far. So I had three versions of solving this, they are below: <?= '&copy 2015 -' . date("Y");?> <?php function auto_copyright($year = 'auto'){ if(intval($year) == 'auto'){ $year = date('Y'); } if(intval($year) < date('Y')){ echo '&copy ' . intval($year) . ' - ' . date('Y'); } if(intval($year) > date('Y')){ echo '&copy ' . date('Y'); } } auto_copyright(); auto_copyright('2016'); ?> <?php $startDate = 2015; $currentDate = date('Y'); echo '&copy ' . $startDate . (($startDate != $currentDate) ? '-' . $currentDate : ''); ?> What I am looking for is another way to solve this, particularly involving function. Cheers
    1 point
  2. 1 point
  3. This is going to come as a surprise to you, but from where I am sitting I cannot see over your shoulder and look at the code on your screen. I do not what query you ran, what data your loop is processing or what your loop is outputting to the screen, or anything else it may be doing. Therefore it not possible for me to tell you what to do in your situation.
    0 points
  4. Haven't you learnt yet that you can't always copy/paste code and expect it to work straight out of the box? I created a connection $db and passed that as a parameter. However, you created a connection $conn so pass that instead. $pdf = new attendPDF($db, $_GET['oracleid'], $_GET['sdate'], $_GET['edate']); ^ ^ $conn
    0 points
This leaderboard is set to New York/GMT-04:00
×
×
  • 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.