I was trying to print multiple images using img tag in HTML using PHP loops, but it was only printing it once. here is what I tried :
$rating = 5;
for ($i = 1; $i <= 5; $i++) {
echo($i);
echo("<img style='width: 20px; height:20px;' src='../project/images/star.png'");
}
?>
Output: image
If I remove the img tag it works as expected.