I am trying to write a for loop inside a while loop the for loop works out side but does not work on the inside of the while loop can some one tell me how to make this code work. This is how my code looks
while($row =mysql_fetch_array($results)) {
$book_title = $row['title'];
$book_rating = $row['Rating'];
$Sresults .=<<<RUS
<h1> $book_title</h1>
<div id="priceleft"><b>
Quality Rating: </b>
for($i=0; $i<=$book_rating; $i++)
{
echo "<img src='Images/Stars/star2.gif' alt='rating' />";
}
</div>
RUS;
}// end while
print $Sresults;