What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » simple php help

simple php help
Author: Message:
spokes
Full Member
***

Avatar
I <3 Rollerblading

Posts: 423
Reputation: 10
33 / Male / Flag
Joined: May 2004
O.P. simple php help
OK, so on my site, i have an image gallery which gets the image information from a mysql database, then i use php to display the information

but ATM i have them all going down in a list like

#
#
#
#

# representing image

but i would like it in a table with 4 columns that creates a new row on every multiple of 4
eg
# # # #
# # #

etc

how can i do this in php, thanks in advance

here's my code, yes the html is bad

code:
$i=0;
while ($i < $num) {

$Desc=mysql_result($result,$i,"Desc");
$File=mysql_result($result,$i,"File");
$Type=mysql_result($result,$i,"Type");
$Date=mysql_result($result,$i,"Date");

if ($Type=="vid") {
echo "<div align='center'><img src='Media/video.jpg'><br />Description : $Desc<br /><br /><a href='Media/$File' target='_blank'>View Video</a><br />Added On $Date<br />-----<br /></div><br /><br />";
} else {
echo "<div align='center'><img src='Media/$File' width='200' height='150' border='1'><br />Description : $Desc<br /><br />Filename : $File<br /><br /><a href='Media/$File' target='_blank'>Click to see full size picture</a><br />Added On $Date<br />-----<br /></div><br /><br />";
}
$i++;
}
?>


[Image: sig15ws.png]
01-05-2006 06:08 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
simple php help - by spokes on 01-05-2006 at 06:08 PM
RE: simple php help - by L. Coyote on 01-05-2006 at 06:26 PM
RE: simple php help - by spokes on 01-05-2006 at 06:38 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On