Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [CSS][HTML][PHP]Simple Ad Rotation Script, Potrzebna pomoc przy zaaplikowaniu zdjec w kodzie. Nie wychodzi mi to.
finderya
post 21.04.2017, 13:50:31
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 21.04.2017

Ostrzeżenie: (0%)
-----


<?php

// random number 1 - 100 $result_random = rand(1, 100);

// if result less than or equal 70, display ad1 (70%)
if($result_random <= 70){
echo "ad1";
}

// if result less than or equal 90, display ad2 (20%)
else if($result_random <= 90){
echo "ad2";
}

// if result less than or equal 100, display ad3 (10%)
else {
echo "ad3";
}

?>
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 19.07.2025 - 15:46