Mam problem z napisaniem funkcji która przedstawi liczbę np: 12900009 w postaci 12.900.009
Czy jest do tego jakaś gotowa funkcja ?
A jeśli nie to jak wygląda implementacja takiej funkcji?
Bardzo proszę o pomoc
THX!
Mam problem z napisaniem funkcji która przedstawi liczbę np: 12900009 w postaci 12.900.009
Czy jest do tego jakaś gotowa funkcja ?
A jeśli nie to jak wygląda implementacja takiej funkcji?
Bardzo proszę o pomoc
THX!
function xxxxx($Value){
$len = strlen($Value);
$result = "";
for($i = 0; $i<$len; $i++){
if((($i-$len) % 3 == 0)&($i != 0)) $result .= ".";
$result .= $Value[$i];
}
return $result;
}
number_format($number, 0, '', '.');