How to convert a string number to integer

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
seandisanti
php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Re: How to convert a string number to integer

Post by seandisanti » Mon Oct 15, 2012 1:57 pm

Use a data type large enough to hold the number and you won't have a problem. For int your threshold is around 2 billion. if you use float or double, you expand the size of the container and it works properly.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest