Hi there,

I format my results using the following code:

  <?
// format results by row
while ($row = mysql_fetch_array($sql_result)) {
 $title = $row["title"];
 $desc = $row["description"];
 $image = $row["image"];

$url = "index3.php?image=".($row["image"]);

?>
  <a href="<?=$url?>&<?="$PHPSESSID"?>"><img src="images/<?=$image?>.jpg"
align = "center" width="150" height="100" hspace="15" border="0"><br>
  <?=$title?><br>
  </a><br>
  </font>
  <?

}

// free resources and close connection
mysql_free_result($sql_result);
mysql_close($connection);

?>

I prefer to use this method rather than echo's as it's easier to follow (I
don't know about any downsides though, I just know it's easier for me to
program this way).

I tried the code that you gave (Bogdan, thank you) but still being fairly
fresh to PHP I couldn't get it to work.  I need it to display 3 across and
however many down in a table, but can't for the life of me get it to work
the images just display ontop of each other or all on one line - wish I
could use programmers logic but i'm not a very logical person.

Any help would be very appreciated - something which fit in with the kind of
code I use above would be a GODSEND.

Thanks again and happy holidays :-)

Regards

Chris




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to