Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Co jest źle w tym if?
todolist
post
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 12.09.2009

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


if (is_numeric($_SESSION['user']['id'])) ? return true : else return false;

Gdzie jest błąd?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
kfc4
post
Post #2





Grupa: Zarejestrowani
Postów: 195
Pomógł: 18
Dołączył: 7.10.2007

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


  1. if (is_numeric($_SESSION['user']['id']))
  2. return true;
  3. else
  4. return false;

To musi być w jakiejś funkcji. Albo
  1. $wynik = is_numeric($_SESSION['user']['id']) ? true : false;

To bezpośrednio nada zmienne wartość.
Go to the top of the page
+Quote Post

Posty w temacie


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: 10.10.2025 - 08:30