$sql=mysql_query("SELECT * FROM useritem WHERE userid='$verified_id'");
$sql=mysql_fetch_array($sql);
print"<table width=80% border=1 cellspacing=0 cellpadding=0>";
$count=1;
$first=first;
if($sql[item1]!=0){
$first.$count=$sql[item1];
$count++;
}
if($sql[item2]!=0){
$first.$count=$sql[item2];
$count++;
}
Well what this is supposed to do is make a list of items such as 1 2 3 in a 2 x something formation.
[first][second]
[third][fourth]
[fifth][sixth]
[eighth][nineth]
itll ignore empty results because it increments all variablenames once a result has been registered.
My problem is that i cant make the variable name how i want it :
$first.$count=$sql[item2];
I want it too make a variable called $first(number stored in count vairable) to equal the sql querys items for example
$count=43
$first($count)=$sql[item2]
($first43=$sql[item2])
echo $first43
(displays what was in $sql[item2]'s contents)
Any help would be great thanks.