Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] Rangi
-LUQash--
post
Post #1





Goście







No więc chiałbym zrobic system rang na podobieństwo phpbb ale mam pewien problem --' , że wyświetla mi tylko pierwsze dwie rangi, a poźniej bezwzględnie na ilość napisanych postów jest ta druga ; d

  1. <?php
  2. <--- kod --->
  3. function rangi($posty)
  4. {
  5. if ($posty < 499) return "lol";
  6. if ($posty >= 500 return "lol2";
  7. if ($posty >= 5000 return "lol3";
  8. if ($posty >= 10000) return "lol4";
  9. }
  10. <--- dalsza część kodu --->
  11. ?>


PS: nie smiac sie bo ja jestem w tym newbie ; (
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
xberus
post
Post #2





Grupa: Zarejestrowani
Postów: 9
Pomógł: 0
Dołączył: 6.08.2003

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


  1. <?php
  2. <--- kod --->
  3. function rangi($posty)
  4. {
  5. if ($posty < 499) return "lol";
  6. if ($posty >= 500 && $posty<5000) return "lol2";
  7. if ($posty >= 5000 && $posty<10000) return "lol3";
  8. if ($posty >= 10000) return "lol4";
  9. }
  10. <--- dalsza część kodu --->
  11. ?>
Go to the top of the page
+Quote Post
UDAT
post
Post #3





Grupa: Zarejestrowani
Postów: 442
Pomógł: 0
Dołączył: 27.12.2005

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


  1. <?php
  2. <--- kod --->
  3. function rangi($posty)
  4. {
  5. if ($posty < 499) return 'lol';
  6. elseif ($posty<5000) return 'lol2';
  7. elseif ($posty<10000) return 'lol3';
  8. else return 'lol4';
  9. }
  10. <--- dalsza część kodu --->
  11. ?>
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 24.08.2025 - 10:35