Page 1 of 1

Get the last number of integer value

Posted: Sat May 05, 2007 1:49 pm
by arukomp
Hi,

Let's say I have a value:

$BigNumber = "487786572";

Now I need to get the last number of $BigNumber - 2 and assign it to a new variable. How can I do that?

Thanks for any suggestions.

Posted: Sat May 05, 2007 1:54 pm
by John Cartwright

Posted: Sat May 05, 2007 1:58 pm
by Christopher
$BigNumber % 10

Posted: Sun May 06, 2007 1:03 am
by arukomp
Thanks for pointing to substr()