[PHP] Formatowanie tekstu

0

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!

0
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;
}
0

number_format($number, 0, '', '.');

1 użytkowników online, w tym zalogowanych: 0, gości: 1