just a little if/else code i cant seem to get right.
wasnt sure if this was the right forum-but i need help to find out what is wrong with it.
pretty simple to reilise what im trying to work out:
if ($ratings[votes]===0) echo "0"; else if ($current = $ratings[total] / $ratings[votes] === 0< Echo "Current Rating: " . ($current) . "<br>";
simply-if i dont have the if else there-when $ratings[votes] == 0, i get an error on my page saying division by zero-this is understandable.
i am just trying to make a code where its like if $ratings is 0, echo Current Rating = 0 and dont do the division or echo current rating: $current. <br> etc.
what am i doing wrong? (prob alot of stuff but u know)
Thanx For Reading