Jump to content


Photo

div tag around code (huggiebear may know)


  • Please log in to reply
No replies to this topic

#1 ltoto

ltoto
  • Members
  • PipPipPip
  • Advanced Member
  • 162 posts

Posted 18 September 2006 - 03:20 PM

I was just wondering how to style the country Id part in this code

<?php 

$sql="SELECT c.countryName, c.countryImage, r.regionName, r.Id 
    FROM tabCountry c, tabRegion r 
    WHERE c.Id = r.countryId";
$result = mysql_query($sql);
if (!$result) {
   die('Invalid query: ' . mysql_error());
}
$country = "null";
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)){
   $cheader = $row['countryName'];
   if (strcmp($country,$cheader) !=0){
      $country = $row['countryName'];
	 
      echo <<<HTML
       
	    <br>
		
       
         <div class="homebar2"><h1>$cheader</h1></div>
 <div class="country">  <img src="../thumb/phpThumb.php?src=../images/country_{$row['countryImage']}&amp;w=100&amp;h=100&amp;zc=1"  alt="Latest Deals">   </div>  
         
HTML;
   }
echo <<<HTML
   <a href="index.php?Id=16&id={$row['Id']}">{$row['regionName']}</a><br>
HTML;
} 
?>

so i want to style the regions basically




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users