I am trying to use a variable to refer to a column of a fetch_array.
Problem is it is not working:
$table_field = "name";
$result = "select * from table";
while($myrow = mysql_fetch_array($result);
$text .= $myrow[$table_field] . ", "; // Note: if I use 'name' it works fine...
}
echo $text;
Can anyone see a problem with my code or something I am missing?