Code: Select all
if ($count == 1)
{
if ($row->rating1 == "1") { echo " selected='selected'";}
}
if ($count == 1)
{
if ($row->rating1 == "2") { echo " selected='selected'";}
}
if ($count == 1)
{
if ($row->rating1 == "2") { echo " selected='selected'";}
}
if ($count == 1)
{
if ($row->rating1 == "2") { echo " selected='selected'";}
}But I need to query four fields in the product table, $row->rating1-4.
I could do it like the above, but there willbe 10 of them.
How can I changing the $row->rating1.... to dynamically query to 1, 2, 3, 4 as the count rises?
So rather than having a ton or queries, I can dynamically change the final character of that variable:
$row->rating1
$row->rating2
$row->rating3
$row->rating4.
Something like $ratingrow = $row->rating[].$count;
This is crap, but kinda what I am trying to get to.