Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php]Invalid argument supplied for foreach()
Duke Nukem
post
Post #1





Grupa: Zarejestrowani
Postów: 29
Pomógł: 0
Dołączył: 20.05.2006

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


Witam!
Wyskakuje mi taki blad:
Invalid argument supplied for foreach() i wskazuje on linie na ten kod:
Kod
foreach ($arrVotes[$i] as $intVote)
        {
            if ($intVote && $arrSumvotes[$i])
            {
                $arrPercentvotes[$i][$j] = ($intVote / $arrSumvotes[$i]) * 100;
                $arrPercentvotes[$i][$j] = round($arrPercentvotes[$i][$j]);
            }
                else
            {
                $arrPercentvotes[$i][$j] = 0;
            }
            $j++;
        }


Co jest zle? Czemu to nie dziala?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Duke Nukem
post
Post #2





Grupa: Zarejestrowani
Postów: 29
Pomógł: 0
Dołączył: 20.05.2006

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


$arrVotes jest tablica
no bo jest tak: $arrVotes = array(array());
Co poczac? Jakies inne pomysly? Czy to moze miec zwiazek z wersja php?

Ten post edytował Duke Nukem 28.06.2006, 12:55:37
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: 27.12.2025 - 02:08