sav571 Posted August 18, 2006 Share Posted August 18, 2006 Hello,i have a variable like $link . $link example mms://mysite/video.wmvi want to remove mms (3charaters at the begining) of $link and add http.how can i do this? Quote Link to comment Share on other sites More sharing options...
craygo Posted August 18, 2006 Share Posted August 18, 2006 $link = "mms://mysite/video.wmv";$url = "http".substr($link, 3);echo $url;Ray Quote Link to comment Share on other sites More sharing options...
AndyB Posted August 18, 2006 Share Posted August 18, 2006 or [url=http://ca.php.net/manual/en/function.str-replace.php]str-replace()[/url] Quote Link to comment Share on other sites More sharing options...
ryanlwh Posted August 18, 2006 Share Posted August 18, 2006 yeah use str_replace Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.