Hover images in PHP Help?

hello i dont know if this is possible with this code i have created, but what i want is this:

When hovering over Class breaking-news i want to load a certain image, but when i hover over the same class again but next news i want to show a different image

I have coded it all and i can get it to actually display the image, just want to know what if statement i could use?

here is the code:

$getnews = “SELECT * FROM news ORDER BY news.id DESC LIMIT 3”;
$news = mysql_query($getnews) or die(mysql_error());

echo “

” .
Breaking News

while($row = mysql_fetch_array($news)){
echo “

” .
Posted on {$row[‘date’]}, by {$row[‘author’]}
” .
” .
Read More

if ()
$getimage = “SELECT * FROM news_images WHERE imageID=’{$row[‘imageID’]};’”;
$image = mysql_query($getnews) or die(mysql_error());
$row = mysql_fetch_array($image);
echo"" .
#latest-news-image{background-image: url(…/{$row[‘imageFile’]});}” .

Sponsor our Newsletter | Privacy Policy | Terms of Service