Published in: PHP
routine i use when doing an uploading function and the image has to have a certain ratio ex: 4:6
<? function get_divisor($x, $y) { if($x%1!=0 || $y%1!=0) return false; for($i=($x>$y?$y:$x);$i>0;$i--) { if($x%$i==0 && $y%$i==0) return $i; } } ?>
You need to login to post a comment.
