Outputting specific HTML for <table> tag.

From: Date: Mon, 22 Jan 2001 19:11:48 +0000
Subject: Outputting specific HTML for <table> tag.
Groups: php.general 
Request: Send a blank email to php-general+get-36058@lists.php.net to get a copy of this message
Hey all. well, here's (probably) an easy question from me again (surprise surprise)..... Here goes: I'm putting together a photo gallery for some friends of mine who own a nightclub, and who want to update photos themselves..... I know there are scripts available to do the job, but I'd like to have a go at my own. Most of the stuff I can handle, but I just need to know what code I might use for returning table cells correctly. Let's say, for example, there are 5 photos that need returning to one of the photo pages, and I have the photos in rows of three; Obviously, there'd be an empty table cell. And I'm not sure exactly how I get the results back into rows correctly anyway... Bullet points and whole table rows are fine, but table cells? Hrms. Anyway, here's how I might've started writing the code, if I hadn't realised I should ask for help first ;) : <? // Connection code $table = "<table border=\"0\" /* Yadda Yadda */ >"; while($row = mysql_fetch_array($result)) { $row = $photo['photo']; $table .= "<tr><td>$photo</td>" $table .= "<td>$photo</td></tr>"; } $table .= "</table>"; // End Crap programming. ?> So. Any takers? :) James.

« previous php.general (#36058) next »