![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 101 Pomógł: 0 Dołączył: 3.12.2005 Ostrzeżenie: (0%) ![]() ![]() |
nazwa tematu może durna ale sens dość prosty:
muszę string "1362.00" zamienić na postać "1 362,00". |
|
|
![]()
Post
#2
|
|
Grupa: Przyjaciele php.pl Postów: 7 494 Pomógł: 302 Dołączył: 31.03.2004 Ostrzeżenie: (0%) ![]() ![]() |
Kod function number_format( number, decimals, dec_point, thousand_sep, p ) {
var n = ( '' + ( Math.round( number * ( p = Math.pow( 10, decimals || 0 ) ) ) / p ) ).split( '.' ); for(var i = ( n[ 0 ] = n[ 0 ].split( '' ) ).length - 3; i>0; i-=3 ) { n[ 0 ].splice( i, 0, thousand_sep ); } return n[ 0 ].join( '' ) + ( n[ 1 ] ? ( dec_point || ',') + n[ 1 ] : ''); } |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 101 Pomógł: 0 Dołączył: 3.12.2005 Ostrzeżenie: (0%) ![]() ![]() |
wielkie dzięki
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 14.10.2025 - 02:41 |