title: Show image on hover with PHP
body: <p>I have a small problem with my PHP code and It would be very nice if someone could help me. I want to display an image when hovering over a link. This is the link with the PHP code that I have now:</p>
  
  <pre><code>&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php if ( has_post_thumbnail() ) {the_post_thumbnail();} else if ( has_post_video() ) {the_post_video_image();}?&gt;&lt;/a&gt;
  </code></pre>
  
  <p>This code shows a image, but I want to execute this code when hovering over the link with the image:</p>
  
  <pre><code>&lt;?php echo print_image_function(); ?&gt;
  </code></pre>
  
  <p>The code also shows a image that belongs to a category. I don't want the initial image to disappear I simply want to show the second image on top off the first image when hovering over the first image.</p>
  
  <p>I don't know if it is helpful but I use Wordpress and I am not a PHP expert. I even don't know if this is going to work. Thats why I am asking if somebody can help me with this. </p>
  
  <p>Thanks in advance</p>
  
  <p><strong>THANKS EVERYONE</strong></p>
  
  <p>I want to thank everybody that took the time to read my post and helped me by giving their solution.
  I didnt exspect so many answers in such a fast time. After spending a few hours trying it to get it to work with PHP, CSS and Javacript, I stumbled upon the following question on this website: <a href="https://stackoverflow.com/questions/7179412/css-hover-over-on-thumbnails-in-wordpress">Solution</a></p>
  
  <p>It was exactly where I was looking for and with a few modifications to fit my needs, I got it to work. Sometimes things can be so easy while you are looking for the hard way. So for everyone that has the same problem: You can use one of the solutions that where given by the awesome people here or take a look at the link above. </p>
  
  <p>Thanks again! :)</p>