我有很多网址(字符串):
$one = 'http://www.site.com/first/1/two/2/three/3/number/342';
$two = '/first/1/two/2/number/32';
$three = 'site.com/first/1/three/3/number/7';
$four = 'http://www.site.com/first/13/two/2/three/33/number/33/four/23';
如何使用 PHP删除这个变量/number/x ?我的例子应该是:
$one = 'http://www.site.com/first/1/two/2/three/3';
$two = '/first/1/two/2';
$three = 'site.com/first/1/three/3';
$four = 'http://www.site.com/first/13/two/2/three/33/four/23';