$split_point = ' - ';
$string = 'this is my - string - and more';
如何使用$split_point
的第二个实例而不是第一个实例进行拆分。我能以某种方式指定从右到左的搜索吗?
基本上我是如何从右向左爆炸的。我只想拿起“-”的最后一个实例。
我需要的结果是:
$item[0]='this is my - string';
$item[1]='and more';
而不是:
$item[0]='this is my';
$item[1]='string - and more';
https://stackoverflow.com/questions/717328
复制相似问题