ForumTEK.Net - IRC Forumu

ForumTEK.Net - IRC Forumu (http://www.forumtek.net/index.php)
-   PHP (http://www.forumtek.net/forumdisplay.php?f=137)
-   -   PHP İle Random Resim (http://www.forumtek.net/showthread.php?t=2272)

Return 20 Eylül 2015 18:52

PHP İle Random Resim
 
Array içerisindeki resimleri random olarak tek tek göstermeye yarayan küçük bir kod..

PHP- Kodu:

$resimler = array('random1.jpg''random2.jpg','random3.jpg','random4.jpg','random5.jpg');
    
    
$i rand(0count($resimler)-1);
    
    print 
'<img src="'.$resimler[$i].'" />'

Alıntı.

İyi forumlar..


All times are GMT +3. The time now is 02:15.

Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.