note 69578 rejected from function.scandir by bobby

From: Date: Mon, 11 Sep 2006 20:01:31 +0000
Subject: note 69578 rejected from function.scandir by bobby
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-117027@lists.php.net to get a copy of this message
Note Submitter: hanif_771 at hotmail dot com ---- Hi, i got this code to load up a random qutoe from a .txt file. What I want is for it to load from multiple .txt files, how do i do that? If u know pls post here. Thanks <?php $file = 'test1.txt'; $conts = file_get_contents($file); $conts = preg_replace('/<><><>[0-2000]*?<><><>/', '\n', $conts); $lines = explode('\n', $conts); $a = mt_rand(0, sizeof($lines)-1); echo 'html before here' . $lines[$a] . 'html after here'; ?>

« previous php.notes (#117027) next »