Php problem! Please help!

SpaceshipSpaceship
Watch

domain4u

We Buy We SellVIP Member
Impact
34
Hi

I want to make 1 banner appear on my site 50% of the time, the rest to appear RANDOMLY!

Anyone help me with this scrip in php please ?

Thanks.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
I'd do a simple rand() function imo..

Like making it rand(1, 100) and if the random number is above 50 then show the banner you want to show most, else show the all different random banners..
 
0
•••
i dont want to use the random function for the main banner, what i am looking is SHOW banner 1 50 % , Then show rest Randomly other 50% . There must be a way to do that!!??!
 
0
•••
domain4u said:
i dont want to use the random function for the main banner, what i am looking is SHOW banner 1 50 % , Then show rest Randomly other 50% . There must be a way to do that!!??!

he just told you how

think about the rand function, then incorporate into your code.
 
0
•••
You will get to do it using the rand function... like I said if the random number is over 50 then display the banner, else display any other banner.. if you make the rand(1, 100) then the main banner has a 50% chance of coming out.. ;)
 
0
•••
Working thanks.
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
CatchedCatched

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back