Location: PHPKode > scripts > Very simple random text > random.class.php
<?php
class randomWord {
    var $file;
    function randomWord($newfile)
    {
        $this->file = $newfile;
    } 
    function showWord()
    {
        $read = file($this->file);
        $x = shuffle($read);
        echo $read[$x];
    } 
} 
Return current item: Very simple random text