>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>";
> }
never used foreach()... but I would check the following:
$row($key)) <= appears to have an extra ) though it would just be printed in
your example
$row($key) <= if it is an array reference, should be $row[$key]
Here is another way to do your problem though
while(list($key,$value)=each($champs)){
echo "<td class='$value'>$key</td>";
}
Dave
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php