Adding variables php in Wordpress?

I'm trying to add some variables and get them to display

Please take a look and help me find the problem area. The display for $r and $y are working but it will not calculate, it comes up zero and then error for the last one.

<?php
$y = get_ept_field('yp');
$r = get_ept_field('retail');
echo $y;
echo $r;
$savings = $r - $y;
echo $savings;
$off= $savings / $r;
echo $off;
?>
 
Back
Top