Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Kaip, padaryt atsitiktinį banerį?

Parašė bobalt· 2010 Sau. 21 14:01:55
#1

Kaip padaryt, kad tarkim surašau, kokius 5 bannerių kodus, o rodo tik vieną atsitiktinį? ?|

Parašė new· 2010 Sau. 21 14:01:55
#2

openside("Reklama");
      $text = array("<center><a href='http://pkt-lt.com'><img src='http://www.pkt-lt.com/images/pkt468.gif' border=0 alt='Tavo Reklama' /></a> <center>","<center><a href='http://3run.6x.lt'><img src='http://remitalis.lt/martynas/images/468x60.png' border=0 alt='free themes' /></a> <center>","<center><a href='http://themesbase.eu'><img src='http://themesbase.eu/images/460x60.jpg' border=0 alt='ggames.lt' /></a> <center>","<center><a href='http://www.epoint.co.nr'><img src='http://epoint.huh.lt/images/ep468x60.gif' border=0 alt='Nemokamos temos' /></a>
<center>","<center><a href='http://themesbase.eu'><img src='http://themesbase.eu/images/460x60.jpg' border=0 alt='ggames.lt' /></a>");
      $cc = count($text) ;
      $cl = $cc-1;
      $rand = rand(0,$cl);
      echo"$text[$rand]";
      closeside();




jai padejau + 10

Parašė bobalt· 2010 Sau. 21 14:01:27
#3

O kaip php kodą įterpt į html?

<?php
$text = array("<center><a href='http://pkt-lt.com'><img src='http://www.pkt-lt.com/images/pkt468.gif' border=0 alt='Tavo Reklama' /></a> <center>","<center><a href='http://3run.6x.lt'><img src='http://remitalis.lt/martynas/images/468x60.png' border=0 alt='free themes' /></a> <center>","<center><a href='http://themesbase.eu'><img src='http://themesbase.eu/images/460x60.jpg' border=0 alt='ggames.lt' /></a> <center>","<center><a href='http://www.epoint.co.nr'><img src='http://epoint.huh.lt/images/ep468x60.gif' border=0 alt='Nemokamos temos' /></a>
<center>","<center><a href='http://themesbase.eu'><img src='http://themesbase.eu/images/460x60.jpg' border=0 alt='ggames.lt' /></a>"merkia akį;
$cc = count($text) ;
$cl = $cc-1;
$rand = rand(0,$cl);
echo"$text[$rand]";
?>



Taip?

Redagavo bobalt· 2010 Sau. 21 14:01:42