SleePyCode Forums

Special Site & Other Boards => PasteBin => Topic started by: IchBin on Jul 09, 2007, 05:49 PM

Title: Paste-1184003374:v:use_geshi-1:v:type-php
Post by: IchBin on Jul 09, 2007, 05:49 PM
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>';
Title: Paste-1184003509:v:use_geshi-1:v:type-php
Post by: Guest on Jul 09, 2007, 05:51 PM
// Ü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>';
Title: Paste-1184003613:v:use_geshi-1:v:type-php
Post by: Guest on Jul 09, 2007, 05:53 PM
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>';
Title: Paste-1184004247:v:use_geshi-1:v:type-php
Post by: SleePy on Jul 09, 2007, 06:04 PM
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>';
Title: Paste-1184004317:v:use_geshi-1:v:type-php
Post by: SleePy on Jul 09, 2007, 06:05 PM
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>';