Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] unexpected T_CONSTANT_ENCAPSED_STRING- Pomocy
licha
post
Post #1





Grupa: Zarejestrowani
Postów: 135
Pomógł: 0
Dołączył: 7.12.2010

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


w tych liniach wyskakuje ten właśnie błąd :
unexpected T_CONSTANT_ENCAPSED_STRING
domyślam się że czegoś brakuje ale nie wiem czego

  1. print ("Atak : $ata[0]<a href="/trening/atak.php">trening</a><br />");
  2. print ("Strzaly : $str[0]<a href="/trening/strzaly.php">trenuj</a><br />");
  3. print ("Celnosc : $cel[0]<a href="/trening/celnosc.php">trenuj</a><br />");
  4. print ("Dosrodkowania : $do[0]<a href="/trening/dosrodkowania.php">trenuj</a><br />");
  5. print ("Szybkosc : $gra[0]<a href="/trening/szybkosc.php">trenuj</a><br />");
  6. print ("Kondycja : $konda[0]<a href="/trening/kondycja.php">trenuj</a><br />");
  7. print ("Skutecznosc : $skut[0]<a href="/trening/skutecznosc.php">trenuj</a><br />");
  8. print ("Obrona : $ob[0]<a href="/trening/obrona.php">trenuj</a><br />");
  9. print ("Bronienie : $bro[0]<a href="/trening/bronienie.php">trenuj</a><br />");
  10. print ("podania : $po[0]<a href="/trening/atak">podania.php</a><br />");


Ten post edytował licha 11.02.2012, 11:54:42
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 3)
prowseed
post
Post #2





Grupa: Zarejestrowani
Postów: 433
Pomógł: 64
Dołączył: 29.01.2011
Skąd: Warszawa

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


Zobacz jak Ci skladnie koloruje. Przed znakiem " daj slasha, usun albo zastap apostrofem

  1. print ("Atak : $ata[0]<a href=\"/trening/atak.php\">trening</a><br />");
  2. print ("Strzaly : $str[0]<a href=/trening/strzaly.php>trenuj</a><br />");
  3. print ("Celnosc : $cel[0]<a href='/trening/celnosc.php'>trenuj</a><br />");


--------------------
Go to the top of the page
+Quote Post
Evinek
post
Post #3





Grupa: Zarejestrowani
Postów: 280
Pomógł: 46
Dołączył: 23.03.2010

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


Nie możesz robić takiego czegoś:
print("Jestem taki s"e koleś");
Musisz dawać backslash w tekście przed " (cudzysłów).
Możesz na dwa sposoby:
  1. print ("Atak : $ata[0]<a href=\"/trening/atak.php\">trening</a><br />");

albo
  1. print ("Atak : $ata[0]<a href='/trening/atak.php'>trening</a><br />");


I ogólnie czemu nie robisz na echo tego? Były jakieś testy z tymi funkcjami i echo chyba jest wydajniejsze.

@UP
Równo napisaliśmy. ;]
Za długo myślałem.

Ten post edytował Evinek 11.02.2012, 12:10:20
Go to the top of the page
+Quote Post
licha
post
Post #4





Grupa: Zarejestrowani
Postów: 135
Pomógł: 0
Dołączył: 7.12.2010

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


dzięki działa
Go to the top of the page
+Quote Post

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 Aktualny czas: 19.08.2025 - 14:59