View Single Post
  #4 (permalink)  
Old 21-05-2007, 21:25
DavidAllen's Avatar
DavidAllen DavidAllen is offline
Premium Member
 
Join Date: Jan 2007
Location: Amersham
Posts: 343
Send a message via MSN to DavidAllen Send a message via Skype™ to DavidAllen
Default Ok - so try this

Well perhaps i could have been a bit more helpful, so try this:
Quote:
$j = 0;
$linkimage=array();
$linkfile=array();
$gall = $_GET['gall'];
$test = "/home/simplyti/public_html/members/i/$gall/";
$dir = opendir($test);



while ($file = readdir($dir))
{

if ($file != "." && $file != ".." && $file !="index.php")
{
if(eregi("t[.]jpg", $file))
{

$linkfile[$j]=$file;
$j++;
}
}
}
$j=0;
print "tr>";
sort ($linkimage);
$k=count($linkimage);
for ($i=0;$i<$k;$i++) {
$limage = explode("t.", $linkfile[$i]);
$linkimage = "$limage[0].$limage[1]";
if ($j==3)
{
print '/tr>tr>';
$j = 0;
}

print 'td>div align="center">a href="http://www.simplytied.com/members/i/$gall/$linkimage" target="_new">img src="http://www.simplytied.com/members/i/$gall/$linkfile[$i]" border="0" />/a>/div>td>';
$j++;

}
}
}
closedir($dir);
print "/tr>";
or something like that
Regards

Ps had to edit it cos the [code] tags messed up the code - I removed all the < from the print lines to get it to display properly
__________________
David Allen -
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by DavidAllen; 21-05-2007 at 21:38.
Reply With Quote