RE: [PHP] Warning: Invalid argument supplied for foreach()

From: Date: Sun, 06 Jul 2003 21:10:20 +0000
Subject: RE: [PHP] Warning: Invalid argument supplied for foreach()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-154146@lists.php.net to get a copy of this message
Don't you think it should be like this? foreach($champs as $key=>$value) { echo"<td class='$value'>$key</td>"; //------------------------------^ } -----Original Message----- From: arnaud gonzales [mailto:zeg@9online.fr] Sent: 6. júlí 2003 20:51 To: Php-General Subject: [PHP] Warning: Invalid argument supplied for foreach() Hi all, I am getting crazy, can't understand what i missed! Does anybody know? $champs = array ("titre_art" => "h3" ,"nom" => "bleu", "prenom" => "green", "resume" => "bold"); foreach($champs as $key => $value) { echo "<td class='$value'>$row($key))</td>"; } TIA. zeg

« previous php.general (#154146) next »