You can use substr
Example:
$string_i_want = substr($start_string,0,5);
What that says is I want characters 0 to 5 from start_string and store them in string_i_want.
You can, if you want, store them back in start_string but that would overwrite any values held previously.
I hope that helps.
|