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!
I can't seem to find a simple way to separate or remove a certain number of characters from the end of a string
I have a group of id numbers (e.g., F001, NY230, IL303, etc.) that are either 4 or 5 characters long. I need to separate the last 3 numerical characters from the remaining 1 or 2 alpha characters. Is there an easy way to trim a string by the location of the characters or by the numeral/alpha difference?
I hunted around for a string function but none seem designed to do this.
Any advice on the shortest and simplist way to accomplish this?