Sure:
setlocale(LC_MONETARY, 'en_US'); // let's use USD$
define(COST_PER_LB, 0.75);
$object_weight = 50; // get object weight from MySQL. assuming 50 lbs for example
echo 'Total shipping cost: $' . money_format('%i', $object_weight * COST_PER_LB);