News:

Please note these forums are mostly a testing ground for my SMF work and I don't really use them otherwise.

Main Menu

Paste-1244485264:v:use_geshi-1:v:type-php

Started by SleePy-Busy, Jun 08, 2009, 06:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SleePy-Busy

<?php

$src_height = 180;
$max_width = 100;
$src_width = 180;

$floor_height = floor($src_height * $max_width / $src_width);
$round_height = round($src_height * $max_width / $src_width);

echo $floor_height . ':' . $round_height;

?>