Breaking down variables
Posted: Tue Jun 17, 2003 8:18 am
There is probably a really simple way to do this, but I can't find it in the list of functions in PHP....
I've got a variable e.g. SO7567 and I want to break it down in three parts: SO, 75, 67 and then carry out actions on each part....
Is there an easy way of doing this? In fact, is there a way in PHP?
The variable in this case is always 6 chars long, and I always want it split into 3.
For those interested, SO7567 is a GB mapping reference, and I want to turn it into a true reference - which I can do....!
I've got a variable e.g. SO7567 and I want to break it down in three parts: SO, 75, 67 and then carry out actions on each part....
Is there an easy way of doing this? In fact, is there a way in PHP?
The variable in this case is always 6 chars long, and I always want it split into 3.
For those interested, SO7567 is a GB mapping reference, and I want to turn it into a true reference - which I can do....!