james Oduro james Oduro - 17 days ago 6x
PHP Question

Split php string into variables

I have the following string: "157458210148"

the first 10 character represents something to me so I split it using the php substr() like this:

$pin= "157458210148";
$order_num = substr($pin,0,10);

My question is: How do I return the rest of the string and assign it to a variable?

example $id = 48

Thank you.


Here's an alternative to get both at one time:

list($order_num, $other_num)  = str_split($pin, 10);