note 106161 deleted from function.rand by danbrown

From: Date: Mon, 17 Oct 2011 16:27:18 +0000
Subject: note 106161 deleted from function.rand by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-183936@lists.php.net to get a copy of this message
Note Submitter: Papun ---- $file_info = mysql_fetch_assoc(mysql_query('SELECT * FROM files order by id desc;')); for($i=0;$i<3;$i++){ while(substr($file_info['name'],0,1)=="*"){ $file_info=mysql_fetch_array(mysql_query('SELECT * from files where id < '.$file_info['id'].' order by id desc;')); } $fname=str_replace("+","-",urlencode($file_info['name'])); echo '<a href="/info/'.$file_info['id'].'/'.$fname.'.html"><img src="/thumb/'.$file_info['id'].'.html" height="50" width="50" alt="*" class="round" /></a>'; $file_info=mysql_fetch_array(mysql_query('SELECT * from files where id < '.$file_info['id'].' order by id desc;')); } please make this code random

« previous php.notes (#183936) next »