Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z funkcją in_array
smrodek11
post
Post #1





Grupa: Zarejestrowani
Postów: 42
Pomógł: 0
Dołączył: 27.12.2010

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


Nie mam pojęcia czemu zwraca mi ostrzeżenia uniemożliwiające wykonanie skryptu.


$feedCategory = x
$categorySegregation wygląda tak: Array ( [0] => x )

$feedAuthor = y
$userSegregation wygląda tak: Array ( [0] => y )

Błąd: "Warning: in_array() expects parameter 2 to be array, integer given in" wskazuje na linię:
  1. else if (in_array($feedAuthor, $userSegregation) && $categorySegregation = 0)

Nie mam pojęcia czemu, próbowałem bez dodatkowych warunków, cały czas wyrzuca ostrzeżenia, a skrypt w pełni nie działa


  1. if (in_array($feedCategory, $categorySegregation) && $userSegregation = 0)
  2. {
  3. //kod
  4. }
  5. else if (in_array($feedAuthor, $userSegregation) && $categorySegregation = 0)
  6. {
  7. //kod
  8. }


Ten post edytował smrodek11 23.04.2013, 22:24:31
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: 23.08.2025 - 04:22