I have a very long string that I want to split into 2 pieces.
I ws hoping somebody could help me split the string into 2 separate strings.
I need the first string to be 400 characters long and then the rest in the second string.
I have a very long string that I want to split into 2 pieces.
I ws hoping somebody could help me split the string into 2 separate strings.
I need the first string to be 400 characters long and then the rest in the second string.
$first400 = substr($str, 0, 400);
$theRest = substr($str, 400);
You can rename your variables to whatever suits you. Those names are just for explanation. Also if you try this on a string less than 400 characters $theRest will be FALSE