I'm new to PHP and I know this is an easy one but still can't find a solution.
I have an array that holds 4 different images and I want to echo the results so my HTML looks like this:
<img src="<?php echo $results['image1']?>" >
<img src="<?php echo $results['image2']?>" >
<img src="<?php echo $results['image3']?>" >
<img src="<?php echo $results['image4']?>" >
But what if for example image4 is null? - i don't want to echo the whole
<img src> tag line
How can i do it? Thanks?