imperium2335 Posted April 16, 2009 Share Posted April 16, 2009 Hi, how do I create a margin of error? I have something that doesnt print the image if the width is the same as the second image. but images that are very similar in width still appear, how do i make it so that images with widths that are similar (say 50px) to the other image dont show? $secondwidth = getimagesize($secondimage) ; $firstwidth = getimagesize($firstimage) ; if($secondimage != NULL && $secondwidth[0] < $firstwidth[0]) { echo '<img src="' . "$secondimage" . '" class="ralign" />' ; } elseif($secondwidth != $firstwidth) { list($secondimage, $firstimage) = array($firstimage, $secondimage); echo '<img src="' . "$secondimage" . '" class="ralign" />' ; } Link to comment https://forums.phpfreaks.com/topic/154300-margin-of-error/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.