Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Problem z "if"
-Gość-
post
Post #1





Goście







Witam
Mam pewien problem z "if"
Chciałbym by if zwracało prawdę, jeżeli wyrażenie lewe jest prawdziwe a prawe nie.
O ile z lewym nie mam problemu, ponieważ string $a["wartość"] = TAK lub NIE,
to w prawym $b["wartość"] = 15,21,17

  1. $wartość = 15:
  2.  
  3. if ($a["wartość"] == "TAK" && $b["wartość"] != "$wartość")

Co należy użyć?
in_array czy strpos
Podpowie ktoś jak to ogarnąć.
Go to the top of the page
+Quote Post

Posty w temacie
- Gość   [PHP] Problem z "if"   29.05.2014, 05:24:54
- - gitbejbe   [PHP] pobierz, plaintext $a = array('wartość' ...   29.05.2014, 06:22:50
- - Gość   No dalej nie ogarniam. Chyba czas się przekimać tr...   29.05.2014, 07:41:28
- - Pyton_000   [PHP] pobierz, plaintext if ($a["wart...   29.05.2014, 12:14:12


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 - 17:22