PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Is there a function that will strip a leading 0 off a number? For example it the number is 013 it will make it 13 I dont want to just strip the first character because it could be 113 and I want that to remail 113. Thanks for your help.
Sorry I was not clear with my question the above reply would do the trick it the string was an integer but its actually an image name so 0113.jpg needs to be 113.jpg thanks, sorry for the confustion.
I would [php_man]explode[/php_man]() the string from the . and then convert the first half into an integer, use the code he posted, and then join the two together again.