FRSH Posted March 29, 2011 Share Posted March 29, 2011 I'm working with the youtube API and the function $relatedVideo->watchURL returns a video url However when I use preg_replace("youtube","test",$relatedVideo->watchURL); it gives me the following error preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Delimiter must not be alphanumeric or backslash in <b>C:\wamp\www\site\test.php</b> on line <b>317 Help please? Link to comment https://forums.phpfreaks.com/topic/232019-basic-preg_replace-help/ Share on other sites More sharing options...
bh Posted March 29, 2011 Share Posted March 29, 2011 Hi, you need a delimiter such as / preg_replace("/youtube/","test",$relatedVideo->watchURL); Link to comment https://forums.phpfreaks.com/topic/232019-basic-preg_replace-help/#findComment-1193573 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.