I have an album page which shows 4 images. I want to show a default image if there are less images than 4. I mean if there are 2 images, I want to show default image for 2 times for styling concerns.

I can count images in database like this:

```
 <?php
 $q2=mysql_query("select * from images where i_id=$id");
 $count =  mysql_num_rows($q);

```

And I can find the result like this: 

```
 $result= 4 - $count;

```

But I can't realize how to set up if clause. Any help is appreciated.