dubc07 Posted June 25, 2009 Share Posted June 25, 2009 What im trying to do is this, I have the code working on the current function below, however what I'm wanting to do is if $width greater than $height by 200 I have no idea how this would be done. Any help is appreciated. <?php if($height > $width || $height == $width ){ $dosomthing; } ?> Link to comment https://forums.phpfreaks.com/topic/163624-solved-php-math/ Share on other sites More sharing options...
MasterACE14 Posted June 25, 2009 Share Posted June 25, 2009 scrap that... lol Link to comment https://forums.phpfreaks.com/topic/163624-solved-php-math/#findComment-863339 Share on other sites More sharing options...
gevans Posted June 25, 2009 Share Posted June 25, 2009 <?php if( ( $width + 200 ) >$height ) { $dosomething; } That should work for you, have a look at what was done in the condition @MasterACE14 you have height and width the wrong way round, your statement should be if( ( $width - $height ) > 200 ) Link to comment https://forums.phpfreaks.com/topic/163624-solved-php-math/#findComment-863341 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.