News:

Please note these forums are mostly a testing ground for my SMF work and I don't really use them otherwise.

Main Menu

Paste-1184003374:v:use_geshi-1:v:type-php

Started by IchBin, Jul 09, 2007, 05:49 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

IchBin

echo '<div style="overflow: auto; width: 100%;">';

$i = 0;

echo '<table cellspacing="5" cellpadding="0" width="100%">
      <tr>';
while ($row = mysql_fetch_assoc($query)){
  echo '<td><a href="' . $scripturl . '?page=' . $row['id'] . '">' . $row['subject'] . '</a></td>';  
   $i++;
   if ($i > 2){
      echo '</tr><tr>';
      $i = 0;
      }
}
echo '</tr></table>';
echo '</div>';

Guest

// Übersicht Tauchplätze Österreich
 global $db_prefix, $scripturl;

$category = 1; // Tauchplatzkategorie

$query = db_query(
    "SELECT id, subject
     FROM {$db_prefix}tp_articles
     WHERE category = $category
     AND off = 0
     AND approved = 1
     ORDER BY subject", __FILE__, __LINE__);
echo '<div style="overflow: auto; width: 100%;">';

$i = 0;

echo '<table cellspacing="0" cellpadding="0">
      <tr>';
while ($row = mysql_fetch_assoc($query)){
  echo '<td style="padding-left: 20px;"><a href="' . $scripturl . '?page=' . $row['id'] . '">' . $row['subject'] . '</a></td>';  
   $i++;
   if ($i > 2){
      echo '</tr><tr>';
      $i = 0;
      }
}
echo '</tr></table>';
echo '</div>';
echo '</div>';

Guest

echo '<div>';

$i = 0;

echo '
<table>
   <tr>';

while ($row = mysql_fetch_assoc($query))
{
  echo '<td><a href="' . $scripturl . '?page=' . $row['id'] . '">' . $row['subject'] . '</a></td>';  
   $i++;
   if ($i > 2)
   {
      echo '</tr><tr>';
      $i = 0;
   }
}
echo '
   </tr>
</table>
</div>';

SleePy

echo '<div>';

$i = 0;

echo '
<table>
   <tr>';

while ($row = mysql_fetch_assoc($query))
{
  echo '<td><a href="' . $scripturl . '?page=' . $row['id'] . '">' . $row['subject'] . '</a></td>';  
   $i++;
   //if ($i > 2)
   //{
   //   echo '</tr><tr>';
   //   $i = 0;
   //}
   if($i % 3 == 0)
      echo '</tr><tr>';
}
echo '
   </tr>
</table>
</div>';
No siggy! :D

SleePy

echo '<div>';

$i = 0;

echo '
<table>
   <tr>';

while ($row = mysql_fetch_assoc($query))
{
  echo '<td><a href="' . $scripturl . '?page=' . $row['id'] . '">' . $row['subject'] . '</a></td>';  
   $i++;
   //if ($i > 2)
   //{
   //   echo '</tr><tr>';
   //   $i = 0;
   //}
   if($i % 3 == 0 && $i != 0)
      echo '</tr><tr>';
}
echo '
   </tr>
</table>
</div>';
No siggy! :D