Page 1 of 1

I need a parse suggestion

Posted: Tue Jul 20, 2004 7:26 am
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.

Posted: Tue Jul 20, 2004 9:27 am
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)