hi all
i have a loop that finds a match then needs to add the counter variable to a preset string.
here is the loop and i am looking for an output along the lines of 'class3' as a string.
$row is the result of a mysql_fetch_row
thanks
eric
i have a loop that finds a match then needs to add the counter variable to a preset string.
here is the loop and i am looking for an output along the lines of 'class3' as a string.
$row is the result of a mysql_fetch_row
Code:
//assigns classes the the corsponding class number
$i=1;
$classnum="void";
$classs='class';
while ($i<8)
{
if ($row[i] = $class)
{
$classnum=$classs . $i;
$i=11;
}
$i++;
}
eric
Comment