I have tried muiltiple strings of code to find the awswer please help me out, here's the code
$rating = $row['rating_total'] / $row['number_ratings'];
if($rating < 2 && $rating => 1) {
$rating = ' <img src="rating.png" /> ';
}
if($rating < 3 && $rating => 2) {
$rating = ' <img src="rating.png" /> <img src="rating.png" /> ';
}
if($rating < 4) && ($rating => 3) {
$rating = ' <img src="rating.png" /> <img src="rating.png" /> <img src="rating.png" />';
}
if($rating < 5) && ($rating => 4) {
$rating = ' <img src="rating.png" /> <img src="rating.png" /> <img src="rating.png" /> <img src="rating.png" />';
}
if($rating < 6) && ($rating => 5) {
$rating = ' <img src="rating.png" /> <img src="rating.png" /> <img src="rating.png" /> <img src="rating.png" /> <img src="rating.png" /> ';
}