Q:

PHP preg_match_all with Wordpress to echo a image if more than 1 image in post

Basically what I am looking to accomplish is if there is more than 1 img it will echo the below statement so I can basically have a rollover saying click to see more. Another question would be how would I have it link to the post itself if I were to change it to 'a href' and echo out the permalink to post_id. 
Any help would be very much appreciated.  
function catch_images() {
  global $post, $posts;
  $first_image = '';
  ob_start();
  ob_end_clean();
  $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/ii', $post->post_content, $matches);
  $first_image = $matches [2] [0];
  if ($output == '2') {
  echo '<div class="seemore"><img src="images/magglass.png"></div><div class="seemoretext">See More</div>';
  }
}

Well I feel stupid, I should of just put the following:
if ($output > '2') {

A:

The following is the answer to my own question, it will echo if there is more than 1 img src tag in a given post. 
function catch_images() {
  global $post, $posts;
  $first_image = '';
  ob_start();
  ob_end_clean();
  $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/ii', $post->post_content, $matches);
  $first_image = $matches [0] [1];
  if ($output > '2') {
  echo '<div class="seemore"><div class="seemoreimg"><img src="images/magglass.png"></div><div class="seemoretext">See More</div></div>';
 }
}

Thanks everyone for your help!

