I'm having trouble splitting a string into 2 variables in the following situation:
an outside script from an affiliated site is going to post to my script using GET method, they will give me a numeric string and unfortunately, I cannot modify their script.
The string will be posted using the get method and named 'sid'
so for example, it may be ?sid= 1009102
Now here's what I want to do:
I need to "grab" the first 4 digits, and pass them into one variable.
There may be any number of digits after that, I'll need to pass those digits into a second variable.
For the above example, I'd need it to pass into the following:
$variable1 = 1009
$variable2 = 102
However, should there be more digits, such as in this example, I'll need to tack them onto the end of $variable2 :
$variable1 = 1010
$variable2 = 20000
In other words, the first four digits will always be passed into $variable1 and anything else will be passed into $variable2
I've never done anything of this nature before so any help is appreciated.