$max_width || $height > $max_height) { if($width > $max_width) { $height = $height*$max_width/$width; $width = $max_width; } if($height > $max_height) { $width = $width*$max_height/$height; $height = $max_height; } } if($return_value == "w") { $image_dimension = $width; } else { $image_dimension = $height; } return round($image_dimension, 2); } } // END photo_size() METHOD } ?>