get the last digits from a number

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
nologin666
Forum Newbie
Posts: 2
Joined: Mon Jul 20, 2009 4:55 pm

get the last digits from a number

Post by nologin666 »

Hello dear,
Can somebody help me to get the last digits from numbers like:
90000007 - needed result 7
90012001 - needed result 12001
90000010 - needed result 10
90009010 - needed result 9010

etc....
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: get the last digits from a number

Post by McInfo »

Math?

Code: Select all

90009010 - 90000000 = 9010
Edit: This post was recovered from search engine cache.
Last edited by McInfo on Wed Jun 16, 2010 3:35 pm, edited 1 time in total.
nologin666
Forum Newbie
Posts: 2
Joined: Mon Jul 20, 2009 4:55 pm

Re: get the last digits from a number

Post by nologin666 »

Ha!
Thank You!
Very simple...
I did not remember for that....
I was looking for regular expresions and so ever!
Very cool solution for particular case!

Thank You!
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: get the last digits from a number

Post by McInfo »

:wink:

Edit: This post was recovered from search engine cache.
Last edited by McInfo on Wed Jun 16, 2010 3:35 pm, edited 1 time in total.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: get the last digits from a number

Post by Christopher »

McInfo is like magic! :D
(#10850)
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: get the last digits from a number

Post by Benjamin »

Funny stuff :)
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: get the last digits from a number

Post by McInfo »

arborint wrote:McInfo is like magic! :D
That has a ring to it. If I ever need a slogan, I'll remember that.

Edit: This post was recovered from search engine cache.
Post Reply