Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Błąd Notice: Undefined offset: 2 Pomocy, Bład
bulias
post
Post #1





Grupa: Zarejestrowani
Postów: 34
Pomógł: 2
Dołączył: 6.11.2005

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


Witam!
Jestem dopiero początkującym w php i sćiągnołem sobie skrypt który ma za zadnie żeby menu pojawiało się w zakładkach tylko że mam mały problem wyskakujem mi taki błąd:
  1. <?php
  2. Notice: Undefined offset: 2 in c:&#092;usrApachehtdocs1.php on line 20
  3.  
  4. ?>

CZy może wie ktoś co mam poprawić w konfiguracji php bardzo proszę o pomoc
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 3)
Spirit86
post
Post #2





Grupa: Zarejestrowani
Postów: 607
Pomógł: 23
Dołączył: 8.09.2004
Skąd: Wrocław

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


złe przesunięcie w tabeli, pokaż 20 linijkę kodu, najlepiej, to pokaż większą część, np. linijki 1-40
Go to the top of the page
+Quote Post
bulias
post
Post #3





Grupa: Zarejestrowani
Postów: 34
Pomógł: 2
Dołączył: 6.11.2005

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


Oto kod php:
  1. <style type="text/css"><!--
  2. #menu td { border-bottom:1px solid black; }
  3. #menu .p { font-size:0px; width:5px; }
  4. #menu .m { border:1px solid gray; padding:5px; background:#f6f6f6; }
  5. #menu a { text-decoration:none; color:black; }
  6. #menu a:hover { color:red; }
  7. --></style>
  8. <?
  9. $m = !isset($_GET["m"])?1:(int)$_GET["m"];
  10. $ms[$m] = 'style="border:1px solid black; 
  11.  border-bottom:1px solid white; background:white;"';
  12. ?>
  13.  
  14. <table cellpadding="0" cellspacing="0" border="0" id="menu">
  15. <tr>
  16. <td class="p" style="width:10px;">&nbsp;</td>
  17. <td class="m" <?=$ms[1]?>><a href="index.php?m=1">menu 1</a></td>
  18. <td class="p">&nbsp;</td>
  19. <td class="m" <?=$ms[2]?>><a href="index.php?m=2">kolejne menu 2</a></td>
  20. <td class="p">&nbsp;</td>
  21. <td class="m" <?=$ms[3]?>><a href="index.php?m=3">menu 3</a></td>
  22. <td class="p">&nbsp;</td>
  23. <td class="m" <?=$ms[4]?>><a href="index.php?m=4">menu 4</a></td>
  24. <td class="p">&nbsp;</td>
  25. <td class="m" <?=$ms[5]?>><a href="index.php?m=5">menu 5</a></td>
  26. <td class="p" style="width:50px;">&nbsp;</td>
  27. </tr>
  28. </table>
Go to the top of the page
+Quote Post
dr_bonzo
post
Post #4





Grupa: Przyjaciele php.pl
Postów: 5 724
Pomógł: 259
Dołączył: 13.04.2004
Skąd: N/A

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


A gdzie masz zdefiniowane
$ms[2] i $ms[ 3 ] itd ($ms[ 1 ] tez )
?
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: 22.08.2025 - 11:50