9three Posted June 19, 2009 Share Posted June 19, 2009 Hey, does anyone know a way to grab a part of a string or integer? $string = 'Hello World!'; $int = 123456789; The tricky part is that the string we always be different as well as the int. I want to pull the last 4 of that integer (6789) or the last 4 of that string (rld!) I'm not sure if there is a function for this? Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted June 19, 2009 Share Posted June 19, 2009 If you just want to get the last 4 characters, use substr Quote Link to comment Share on other sites More sharing options...
9three Posted June 19, 2009 Author Share Posted June 19, 2009 ah yes thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.