Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Problem z if
szczabik
post
Post #1





Grupa: Zarejestrowani
Postów: 226
Pomógł: 1
Dołączył: 13.05.2008

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


Mam taki warunek if
  1. <?php
  2. if (strlen($tytul)==0) || strlen($jeden)==0) || strlen($dwa)==0) || strlen($trzy==0) {
  3. ?>

i nie wiem co jest źle bo co chwile wywala błąd.


Wie ktoś co jest nie tak ?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
MWL
post
Post #2





Grupa: Zarejestrowani
Postów: 493
Pomógł: 32
Dołączył: 14.04.2008
Skąd: Lenkowski.net

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


strlen($trzy==0)

zamień na strlen($trzy)==0)

pousuwaj także niepotrzebne ) bo np. strlen($tytul)==0) powinno być strlen($tytul)==0 lub (strlen($tytul)==0)

Ten post edytował MWL 6.10.2008, 18:30:27
Go to the top of the page
+Quote Post
batman
post
Post #3





Grupa: Moderatorzy
Postów: 2 921
Pomógł: 269
Dołączył: 11.08.2005
Skąd: 127.0.0.1




Masz za dużo nawiasów.
  1. <?php
  2. if (strlen($tytul)==0 || strlen($jeden)==0 || strlen($dwa)==0 || strlen($trzy==0)) {
  3. ?>
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: 23.08.2025 - 07:01