Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [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
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


--------------------
Wpadaj na mój kanał o PHP. Dużo mięsa 🥩!
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. ?>


--------------------
I would love to change the world, but they won't give me the source code.
My software never has bugs. It just develops random features.
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 - 20:39