Problems converting strings with 0 to integer

From: Date: Wed, 03 Nov 2010 21:22:01 +0000
Subject: Problems converting strings with 0 to integer
Groups: php.general 
Request: Send a blank email to php-general+get-309279@lists.php.net to get a copy of this message
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

« previous php.general (#309279) next »