Hi I am trying to display a web page. I have a database table with 11 fields. I have populated a php array with the field headers
Now I want to use the echo to print put each valuein the returned row array, such as
So variable is printing out, but I am just getting blank lines for $row[$VARIABLE]. Is it not possible to pull result back from a $row array like this? Anytips on a better way?
Thanks for any help you can give.
------------------------------------------
Somethings come from nothing, nothing seems to come from somethings - SFA - Guerilla
roycrom
Code:
$FIELDS=array("Barcode", "Status"......);
$result=mysql_query("SELECT * FROM table WHERE Barcode=$Barcode"); //barcode from $_GET variable
$row=mysql_fetch_row($result); //only 1 row will return
Code:
foreach($FIELDS as $VARIABLE) {
echo "$VARIABLE<BR>"; //Make sure var is set
echo "$row[$VARIABLE]<BR>"; //This line just blank
}
Thanks for any help you can give.
------------------------------------------
Somethings come from nothing, nothing seems to come from somethings - SFA - Guerilla
roycrom