$split_point = \' - \';
$string = \'this is my - string - and more\';
How can i make a split using the second instance of $split_point and not the
I liked Moff's answer, but I improved it by limiting the number of elements to 2 and re-reversing the array:
$split_point = ' - ';
$string = 'this is my - string - and more';
$result = array_reverse(array_map('strrev', explode($split_point, strrev($string),2)));
Then $result will be :
Array ( [0] => this is my - string [1] => and more )