Diversions
09-23-2005, 11:43 AM
I have just installed a simple blog program at www.a-diversion.com/blog and there is a table on the right for "other blogs" The php is ordering that the links be "shuffled" and I want the links to appear as I place them. Since the index.php file contains the php commands for that LINKS area, I suspect that it is the only thing I need to change but I am unsure as to the proper structure.
Currently the php command for the link area is as follows (I tried dropping the shuffle part and messed it up)
// LINKS SECTION
if(file_exists("links.txt")) {
$links = file("links.txt");
}
$num = count($links);
if($num >= 1) {
print("<BR><font size=2 face=verdana><B>
<U>Other Blogs:</U><BR><BR>");
srand((float)microtime()*1000000);
shuffle($links);
for($i=0; $i<count($links); $i++) {
print("$links[$i]<BR>");
}
print("</font></B>");
}
print("
Also, is there any way of writing the .txt file so I can create spaces between the entries on a selective basis?
Can anyone point me in the right direction please? It would be greatly appreciated.
Thanks
Currently the php command for the link area is as follows (I tried dropping the shuffle part and messed it up)
// LINKS SECTION
if(file_exists("links.txt")) {
$links = file("links.txt");
}
$num = count($links);
if($num >= 1) {
print("<BR><font size=2 face=verdana><B>
<U>Other Blogs:</U><BR><BR>");
srand((float)microtime()*1000000);
shuffle($links);
for($i=0; $i<count($links); $i++) {
print("$links[$i]<BR>");
}
print("</font></B>");
}
print("
Also, is there any way of writing the .txt file so I can create spaces between the entries on a selective basis?
Can anyone point me in the right direction please? It would be greatly appreciated.
Thanks