<?php function calc_simple_interest($principal, $annualrate, $years) { return $principal * $annualrate * $years; } echo calc_simple_interest(22000, .0539, 6), '<br />'; echo calc_simple_interest(1000, .085, .5); ?>