in fact i still have a tiny problem
when i print_r() the $var :
$sql = "SELECT * FROM items LEFT JOIN ext ON ext.id=items.id WHERE items.id='2'";
$res = mysql_query($sql);
while($row = mysql_fetch_assoc($res)){
$fields[] = $row;
}
foreach($fields as $key =>$var){
print_r($var);
echo "<br /><input type=\"text\" name=\"".$key."\" value=\"".$var."\" />";
}
i get this
Array ( [id] => 2 [p_id] => 0 [rank] => 2 [title] => item 2 [online] => 1 [type] => page [ext_id] => 2 [adresse] => adresse 2 )
because $var is an array - curses !!
whereas i only need the [adresse] => adresse 2 field name and value
how can i change the foreach so that it will do this ?
thanks