I swear, my head is going to split, I am SO confused right now I'm about to yank my effing hair out.
Okay, so I have this to work with (and keep in mind I know just about jack for PHP and I'm not even halfway finished with a book on it).
Since I basically have no idea how it could be used with a five-columned table, some guy told me to use this:
Well, I have no idea on earth how the hell the code he gave me is to be used with the first script is supposed to go. I have tried in every single way, shape, and form that I know of to try and get the two to work as one. But nope, I get parse error after parse error after parse error.
Does anyone know how I am supposed to make the second script go with the first one? Will give 75 NP$ to anyone that can help me sort this out, sorry for sound like a bumbling idiot.
Thanks in advance,
Andy
Okay, so I have this to work with (and keep in mind I know just about jack for PHP and I'm not even halfway finished with a book on it).
Code:
<?
//get directory handle
$hook = opendir("icons");
//read directory and echo list
while (($file = readdir($hook)) !== false)
{
if ($file != "." && $file != "..")
{
//set up full path
$path = $location."/".$file;
//check for directory
if (is_dir($path))
{
echo "<a href=aim:BuddyIcon?src=http://www.iming.org/imsite/gallery/icons/$file><img src=http://www.iming.org/imsite/gallery/icons/$file border=0></a>";
} else {
echo "<a href=aim:BuddyIcon?src=http://www.iming.org/imsite/gallery/icons/$file><img src=http://www.iming.org/imsite/gallery/icons/$file border=0></a>";
}}}
//close directory
closedir($hook);
?>
Since I basically have no idea how it could be used with a five-columned table, some guy told me to use this:
Code:
echo "<table>";
echo "<tr>";
$counter = 0;
while ( stuff to display)
{
// start a new row
if ($counter == 5)
{
echo "</tr><tr>";
}
echo "<td> stuff ... </td>";
// add 1 to counter, or go back to 1
$counter = ($counter + 1) % 5;
}
// need to fill up last row with empty columns
while ($counter < 5)
{
echo "<td></td>";
++$counter;
}
// close row and table
echo "</tr>";
echo "</table>";
Well, I have no idea on earth how the hell the code he gave me is to be used with the first script is supposed to go. I have tried in every single way, shape, and form that I know of to try and get the two to work as one. But nope, I get parse error after parse error after parse error.
Does anyone know how I am supposed to make the second script go with the first one? Will give 75 NP$ to anyone that can help me sort this out, sorry for sound like a bumbling idiot.
Thanks in advance,
Andy





