Cheers for your help... I did this in the end... $rest = substr($row[file_info], 27, 100); $download = "/home/sites/site1/web$rest";
where $row[file_info] = the full URL and the 27th character is the .com/ bit. Live and learn, I love this language! Cheers one and all!! Tris... "R'twick Niceorgaw" <[EMAIL PROTECTED]> 24/07/2003 15:18 To: [EMAIL PROTECTED] cc: Subject: Re: [PHP] removing parts of a string... On 24 Jul 2003 at 15:03, [EMAIL PROTECTED] 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() ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ********************************************************************* The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. ***********************************************************************