Jump to content

[SOLVED] Displaying Data based on database entry


Styles2304

Recommended Posts

ok, here's my code again:

 

while ($row = mysql_fetch_array($result)) {
  $entrydate = $row['EntryDate'];
  $data = $row['Data'];
  
  $announcements .=<<<EOD

  <table with="100%" cellpading="0" cellspacing="0" border="0">
    <tr>
      <td colspan="2">
        <font class="h3">
          $entrydate
        </font>
      </td>
    </tr>
    <tr>
      <td width="5">
         
      </td>
      <td width=*>
      <font class="h3">
        $data
      </font>
      </td>
    </tr>
  </table>
  
  <table width="100%">
    <tr>
      <td colspan="2">
        <hr width="70%">
      </td>
    </tr>
  </table>
  
EOD;
  
}

echo $announcements;

?>

 

I also have an entry in my database called index number, is there a way to have it spit out each block of announcements based on the order of the index numbers?

 

For example, the first entry is 1, second is 2 and so on and so on but on the website, I want it spit them out in reverse order so that it's in the order they were posted.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.