Array {
[0] => http://abc.com/video/ghgh23;
[1] => http://smtech.com/file/mwerq2;
}
위의 배열에서 /
본문 /
사이의 내용을 바꿀 싶습니다. video
, file
을 abc
으로 바꾸고 싶습니다. 당신이 http://example.com/xxx/somestuff/morestuff
처럼 이상의 세그먼트와 더 긴 URL을해야 할 수도 있습니다, 특히 다른 의견을 제안 http://php.net/str_replace문자열 대체 PHP
않는 str_replace : 그래서를 할까? preg_replace? – ceejayoz
'preg_replace' 함수를보세요 : http://php.net/manual/en/function.preg-replace.php –