jeudi 28 avril 2016

if($p > 0 && $p <= 1 not worsk in tho decimals

i put this code for calculate price in a function Getprecio.

un producs under cost price its under 1 for example 0.2 or 0.02 this function not woorks `` Why ?

This its the code:

 function getPrecio($p)

{

if($p > 0 && $p <= 1) return $p*1.99;

}

Aucun commentaire:

Enregistrer un commentaire