Re: removing parts of a string...
| From: | R'twick Niceorgaw | Date: | Thu, 24 Jul 2003 14:18:56 +0000 |
| Subject: | Re: removing parts of a string... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156648@lists.php.net to get a copy of this message | ||
On 24 Jul 2003 at 15:03, Tristan.Pretty@risk.sungard.c wrote:
> I wanna be able to take a URL
> http://www.mysite.com/downloads/file_1_a.pdf
>
> and then remove:
> http;//www.mysite.com/
>
> then add:
> /host/sites/site1/web/
>
> to
> downloads/file_1_a.pdf
>
> Turning:
> http://www.mysite.com/downloads/file_1_a.pdf
> Into:
> /host/sites/site1/web/downloads/file_1_a.pdf
>
> I know I need to look up strings, but can someone point me in the
> right direction (I wanna learn, so don't give too much away!)
>
str_replace() ?