Location: PHPKode > scripts > Free PHP Recipes Plug-n-Play Website Script > free-php-recipes-plug-n-play-website-script/main.php
<?php
/************* Recipe *****************************/
/*
Released by AwesomePHP.com, under the GPL License, a
copy of it should be attached to the zip file, or
you can view it on http://AwesomePHP.com/gpl.txt
*/
/************* Recipe *****************************/

$get_cats = mysql_query("SELECT * FROM `recp_cat_list`");

?>
<table width="<?=$PAGE_WIDTH;?>"  border="0" style="border:1px solid #FFDBCA;" align="center" cellpadding="5" cellspacing="0">
  <tr>
    <td width="50%" colspan="2"><div align="center"><font color="#999999" size="4">Please select a category: </font></div>      </td>
  </tr>
  <tr>
    <td colspan="2"><div align="center">
      <table width="100%"  border="0" cellspacing="0" cellpadding="6">
	  <?php	  	 	  
	  $x = 1;
	  while($each = mysql_fetch_assoc($get_cats)){
	  	if($x == 1){ echo '<tr>';}
		echo '<td><a href="'.$SITE_URL.'?R*'.urldecode($each['cat_title']).'">'.$each['cat_title'].'</a></td>';
		if($x == $table_cloumns){ echo '</tr>';$x=0;}
		$x++;
	  }
	  if($x != 1){
		 for($x=$x;$x<=3;$x++){ echo '<td>&nbsp;</td>';}
		 echo '</tr>';
	  }
	  ?>
	  </table>
    </div></td>
  </tr>
</table>
Return current item: Free PHP Recipes Plug-n-Play Website Script