Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] funkcja filtrująca, błąd w foreach
Lejto
post
Post #1





Grupa: Zarejestrowani
Postów: 1 385
Pomógł: 48
Dołączył: 23.05.2007

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


Napisałem funkcje która filtruje znaki
  1. function stripslashes_rcurs($variable, $top = true)
  2. {
  3.  
  4. $clean_data = array();
  5. foreach($variable as $key => $value)
  6. {
  7. $key = ($top) ? $key : stripcslashes($key);
  8. $clean_data[$key] = (is_array($value)) ? stripslashes_rcurs($value, false) : stripslashes($value);
  9. }
  10. return $clean_data;
  11. }

przy jej odpaleniu dostaje błąd
Kod
Warning: Invalid argument supplied for foreach() linia 5

czemu?

Pozdrawiam

Ten post edytował Lejto 9.12.2009, 16:37:13
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: 25.09.2025 - 18:55