|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-01-15 03:57 UTC] sniper@php.net
[2003-01-15 06:04 UTC] bubak at cpan dot cz
[2003-01-15 09:27 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 19:00:02 2025 UTC |
There is problem with output from function number_format() I have compiled PHP 4.3.0 as Apache module. print number_format($number,2,"."," "); if $number is in range 100000 - 999999 or 100000000 - 999999999, output has random character at the begining. example: <? $number=850000000.90; $number_f=number_format($number,2,"."," "); for ($i=0;$i<strlen($number_f);$i++) { print ord($number_f[$i])." --> ".$number_f[$i]."<br />"; } print $number_f; ?> produced: 114 --> r 56 --> 8 53 --> 5 48 --> 0 32 --> 48 --> 0 48 --> 0 48 --> 0 32 --> 48 --> 0 48 --> 0 48 --> 0 46 --> . 57 --> 9 48 --> 0 r850 000 000.90 next run of script add this at the beginning: 72 --> H Thank you for your help. Regards Milan