Warning: Invalid argument supplied for foreach()
Startseite > PHP Fehler > Warning: Invalid argument supplied for foreach()
Erfahren sie hier was diese Warnung beim verwenden der PHP Funktion foreach() auslöst. Auch ist es möglich das diese Meldung sporadisch von PHP ausgegeben wird.
Fehlermeldung
Warning: Invalid argument supplied for foreach() in E:\php-fehler\test_code.php on line 5
Code:
Ursache: foreach erwartet ein array
Weitere Beispiele
Code:
Warning: Invalid argument supplied for foreach() in E:\php-fehler\test_code.php on line 5
Code:
- $string = 'abc';
- foreach($string as $ab){
- echo $ab;
- }
Ursache: foreach erwartet ein array
Weitere Beispiele
Code:
- $string = array(1, 2, 3, 4);//ok
- foreach($string as $ab){
- echo $ab;
- }
- $string = array();//ok
- foreach($string as $ab){
- echo $ab;
- }
- $string = ''; //Warning
- foreach($string as $ab){
- echo $ab;
- }
Kommentar schreiben
andere Themen:
14.04.2005
2013 - Lost connection to MySQL server during query23.02.2005 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL
23.02.2005 Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource
22.02.2005 Parse error: parse error, unexpected T_UNSET
Zurück

Kommentare