Problems converting strings with 0 to integer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a text file (utf-8 encoded) which contains lines with numbers and
text separated by \t.  I need to convert the numbers that contains 0 (at
left) to integers.

For some reason one line that contains 00000002 is casted to 0 instead of 2.
 Bellow the output of the cast (int) $field[0]  where I get this from
explode each line.

0 ï00000002
4 00000004

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux