Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL][PHP] co 10 rekordów enter
tenloginjestzaje...
post
Post #1





Grupa: Zarejestrowani
Postów: 358
Pomógł: 1
Dołączył: 20.07.2014

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


Witam
próbuje zrobić <br /> co 10 rekord w celu utworzenia kolumn. Kombinuje z for, ale bez efektów, próbuje czegoś takiego; Niestety wyświetla <br /> x 10. Dzięki za pomoc.
  1. <?php
  2. $show = '';
  3. $letters = array('A','B','C','D','E','F','G','H','I','J','K','L','Ł','M','N','O','P','R','S','T','U','W','Z');
  4. foreach ($letters as $i) {
  5. $show.='
  6. <div class="boxnaviwho">
  7. <span>'.$i.'</span>
  8. </div>
  9. <div class="boxborder">
  10. <div class="box">
  11. <div class="margintext">';
  12. $sql = "SELECT DISTINCT `adress` FROM `prywatne` WHERE `adress` LIKE '$i%' LIMIT 100";
  13. $result = $conn->query($sql);
  14. while($row = $result->fetch_assoc()){
  15. $a = $a++;
  16. $adress = $row['adress'];
  17. $show.='<a href=".$adress.'">'.ucfirst(str_replace('-','', $adress)).'</a>';
  18. if ($a = 10)
  19. {$show.='<br />';}
  20. }
  21. $show.='</div></div></div>';}
  22. ?>
Go to the top of the page
+Quote Post

Posty w temacie


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: 26.09.2025 - 14:09