2010-03-05 8 views

cevap

15
$dec = $pct/100; 

// if you actually have a % sign in $pct strip it out 
$pct = '15%'; 
$dec = str_replace('%', '', $pct)/100; 
1
function percentToDecimal($percent) 
{ 
    $percent = str_replace('%', '', $percent); 
    return $percent/100; 
}