Volker Nebelung: Rechenfehler?

Beitrag lesen

Aloha 'oe,

$amount = 1990;

$result ['amount'] = $amount/100;
if (intval($amount) == intval(($result ['amount'] * 100))) {
  // hier will ich rein
}
else {
  echo "fehler";
}


>   
> gibt "fehler" aus, warum?  
  
Prüfe doch mal, was in $result ['amount'] steht.  
  
Gruß, Volker

-- 
„I conclude that there are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies."  
- Tony Hoare