I'm trying to insert a random line from a textfile into my website. This is what i have so far, i can't see whats wrong.
I have my footer.php file which i want the text file to be inserted to..
Is there anything wrong in there?Code:<div id="footer"> <div class="footer-inner"> <div class="random-quote"> <?php strand ((double)microtime()*10000000); $f_contents = file ("quotes.txt"); $line = $f_contents[array_rand ($f_contents)]; echo $line; ?> </div> </div> </div>
I also have my quotes.txt in the same directory. And i have one sentence on each line. (about 30 lines)
Here's the error message i get:
Fatal error: Call to undefined function strand() in URL_TO_FOOTER.PHP on line 5
And this is what i have on line 5:
If anyone can tell me what i am doing wrong, it'd be greatly appreciated.Code:strand ((double)microtime()*10000000);
Thanks in advance.