Sycoloco Posted November 29, 2008 Share Posted November 29, 2008 This is the PHP CODE <? include ('./config.php'); $sql = mysql_query("SELECT * FROM ava_cats ORDER BY name"); $total_cats = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM ava_cats"),0); $total_cats2 = 0; while($row = mysql_fetch_array($sql)) { $total_cats2 = ($total_cats2 + 1); if($seo_on == 0) { echo ' <a href="'.$site_url.'/index.php?cat_id='.$row['id'].'">'.$row['name'].'</a> '; } else { $abcd= $row['name']; $abcd = str_replace (" ", "-", $abcd); echo ' <a href="'.$site_url.'/cat/'.$row['id'].'/'.$abcd.'/p1.htm">'.$row['name'].'</a> '; } if ($cat_numbers == 1) { $cat_numb = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM ava_games WHERE catergory_id=".$row['id'].""),0); echo '<em>('.$cat_numb.')</em>'; } if($total_cats2 != $total_cats) { echo ' |'; } } ?> and this is the HTML CODE <div class="TFHmenu2"> <ul><li style="float: right;"> <li><a href="#" class="selected">LINK 1</a></li> <li><a href="#" >LINK 2</a></li> <li><a href="#">LINK 3</a></li> <li><a href="#">LINK 4</a></li> <li><a href="#">LINK 5</a></li> <li><a href="#">LINK 6</a></li> <li><a href="#">LINK 7</a></li> </ul> </div> <br /> what the php code is when i make a new page in my administrator panel, i want the links to have a background behind it instead of just normal text... how would i put the html code with the php code? together in one? help please =) Link to comment https://forums.phpfreaks.com/topic/134749-help-on-a-php-and-html-in-the-same-page-p/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.