Jump to content

Archived

This topic is now archived and is closed to further replies.

sav571

delete 3 charaters at varibale begining

Recommended Posts

Hello,
i have a variable like $link    . $link example  mms://mysite/video.wmv

i want to remove mms (3charaters at the begining)  of $link and add http.

how can i do this?

Share this post


Link to post
Share on other sites
$link = "mms://mysite/video.wmv";

$url = "http".substr($link, 3);
echo $url;

Ray

Share this post


Link to post
Share on other sites
or [url=http://ca.php.net/manual/en/function.str-replace.php]str-replace()[/url]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.