$string = \'Some string\'; $pos = 5; ...??... $begging // == \'Some s\'; $end // == \'tring\';
What is the best way to separate string in two by
How about substr()?
$string = 'Some string'; $pos = 5; $beginning = substr($string, 0, $pos); $end = substr($string, $pos);