I need a parse suggestion

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
fastfingertips
Forum Contributor
Posts: 242
Joined: Sun Dec 28, 2003 1:40 am
Contact:

I need a parse suggestion

Post by fastfingertips »

i want to replace this call: <? getText($id,$position); ?> with the following sentence: <core:text id="" position=""/>.

The sentence will be inserted in a html/file and i'm asking which is the fastest method to parse this.
User avatar
liljester
Forum Contributor
Posts: 400
Joined: Tue May 20, 2003 4:49 pm

Post by liljester »

i would use str_replace(). open the file, read it into a var, do the str_replace on the var, then write the file back (or to a new name just in case)
Post Reply