The data base has 6 fields that I am trying to get. newprice0 newprice1 all the way up to newprice5
This is the code I was trying to use but it won't group the number with the field.
//MARKET CALCULATION
$result = mysql_query("SELECT * FROM g_market LIMIT 1") or die("Please Contact Admin: " . mysql_error());
$market = mysql_fetch_object($result);
for ($i = 0; $i <= 5; $i++)
{
echo "$market->$newprice{$i}";
} It displays 0 1 2 3 4 5
it should display the value of each field in the database.
Anyone have any ideas?
