Text Replacement In PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
FXG
Forum Newbie
Posts: 2
Joined: Tue Jan 20, 2009 3:11 pm

Text Replacement In PHP

Post by FXG »

Hello Everyone,

This is my first post on this forum, it is great! Reading the old posts I have found members to be courteous and very helping, that encouraged me to post my problem here.

What I am trying to do is to remove a URL before saving into html file. Please see the attached file.

The URL I want to remove is:

<a href="/index.php?MIndex=03&currPageNo=1&getStory=goldrates">

I can't figure out why it is not getting replaced with the code in the attached file:
Attachments
goldrates.zip
(872 Bytes) Downloaded 4 times
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Re: Text Replacement In PHP

Post by Burrito »

I'm not downloading your file...just place applicable code within PHP tags here.

if you're just replacing a string, take a look at str_replace()
FXG
Forum Newbie
Posts: 2
Joined: Tue Jan 20, 2009 3:11 pm

Re: Text Replacement In PHP

Post by FXG »

Thanks for trying to help, the issue is resolved and yeah by using str_replace.
Post Reply