How to find the number of a given location.

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!

Moderator: General Moderators

Post Reply
darkhorn
Forum Newbie
Posts: 2
Joined: Thu Sep 03, 2009 3:22 am

How to find the number of a given location.

Post by darkhorn »

I have a big number such as 56781236 (8 digits long).
And I want to find the integer that is in the fourth step, here it is 1.
Or it could be from left, the fifth: 1.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: How to find the number of a given location.

Post by jackpf »

You mean like this?

Code: Select all

substr($int, 4, 1);
Post Reply