Does this not work? or am I just doing it wrong? Tried multiple variations of it, and can't seem to find any solid info on the subject. any ideas?
$given_id = 1;
while ($row = mysql_fetch_array($sql))
{
if ($i < 10){
$display = '<a href="' . $row['info'] . '" onMouseOver="' . if($row['type']=="battle"){ . 'showB' . } else { . 'showA'() . "><div class="' . $row['type'] . "_alert" . '" style="float:left; margin-left:-22px;" id="' . $given_id . '"></div></a>';