У меня есть много ссылок (строка):Удалить текст из строки/URL
$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? для моих примеров должно быть:
$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';