View Single Post
  #2 (permalink)  
Old 06-10-03, 02:22 PM
phpkid phpkid is offline
Hot Moderator ;)
 
Join Date: Jun 2003
Location: India
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
Hm...
First thing.

If you have to put PHP code, put it between [ PHP ] and [/ PHP ] (without spaces) so it will be color coded! see my code below!

PHP Code:

<?

    
    srand
((double)microtime()*1000000);
    
$ile 5;
    
$file_names file("pics.txt");
    echo 
"<table width=\"600\"><tr>";
    
    
$picked_file array_rand($file_names,5); //Ask it to pick 5 random entries!
    
foreach($picked_file as $file)
    {
        
$link $file_names[$file];
        
$sp explode("||"$link);
        if(
$sp[0]<>"")
        {
            echo 
"<td align=middle><a href=\"".$sp[2]."\"><img src=\"".$sp[0]."\" border=3></a><br>
            <font style=\"font-weight: bold; font-size: 11px; font-family: Tahoma\">"
.$sp[1]."<br></font></td>";
        }
    }
    echo 
"</tr></table>";

?>
See if the code solves your problem!

Regards,
JD
__________________
http://www.phpkid.org
Reply With Quote