Well $money (in hand's example) would now equal the difference between both variables.
$money = "5";
$selectedValue = "2";
$money2 = $money - $selectedValue;
// in other words
// $money = 5 - 2
// $money = 3
Then you can do what you want with that variable whether it be display it or input into a database.
If you don't want to "set" a variable, then do
$money = "5";
$selectedValue = "2";
echo $money - $selectedValue;
Cgraz