Simple math with decimals in PHP
问题 This is killing me! I've never had so much trouble and I can't figure out what I'm doing wrong here. If I have a number, say 2.32, and I want to do math with it it won't work out. The very simplest example: $income = $commission; //Commission is 2.32, retrieved from XML echo "income: $income<br>"; $income100 = $income*100; echo "income100: $income100<br>"; The result I get is: income: 2.32 income100: 200 How can I use a decimal number accurately with math without it changing it? Thanks so