Parašė ibodom· 2008 Vas. 23 16:02:00
#2
lilas parašė:
Kaip padaryti kad is array masyvo rodytu ne 1 kaip cia o daugiau? Pvz 3 atsitiktinius
$banners = array('txt1','txt2','txt2','txt4','txt6=5',);
$cc = count($banners) ;
$cl = $cc-1;
$rand = rand(0,$cl);
echo"$banners[$rand]";
Gal taip? :?
$banners = array('txt1','txt2','txt2','txt4','txt6=5',);
$cc = count($banners) ;
$cl = $cc-1;
$rand = rand(0,$cl);
$rand2 = rand(0,$cl);
$rand3 = rand(0,$cl);
echo"$banners[$rand]";
echo"$banners[$rand2]";
echo"$banners[$rand3]";