Scrollbox problem...?

Posts 1–7 of 7 · Page 1 of 1
Scrollbox problem...?
I have a php script that looks like this

random.php
[php]<?

$textfile ="random.txt";



$items = file("$textfile");

$item = rand(0, sizeof($items)-1);

echo "<center>".$items[$item]."</center>";

?>
[/php]


random.txt looks like this
[php]
<? include 'http://www.YOURSITE.com/random.php' ?>
Hejsan
Lol
random text
random
care
[/php]

As you can see, this script randomly choose a word or phrase from random.txt...
Now I want those word or phrases appear in a scrollbox, but I didn't have any succes on doing this, so im asking for help here, if you didn't understand, just tell me and I will try to explain better.

Thanks in advance!
PM nextgen he's genious
Will do!
-Too Short-
Actually he may be in-active

Try contacting Liquidforce.
Hmm seems like nextgen1 isn't in-active, since he liked the comment above ;P
He wasn't on for 6 days
jeez, just
[html]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div style="height:80px;border:1px solid grey;padding:5px;width:250px;overflow:scroll;text-align:center;">
<?

$textfile ="random.txt";
$items = file($textfile);

for ($i=0; $i<10; $i++) {
$item = rand(0, sizeof($items)-1);
echo $items[$item]."<br />";
}

?>
</div>
</body>
</html>[/html]
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?