Jump to content

Margin of Error


imperium2335

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.