Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Better way to replace tags with content? 1

Status
Not open for further replies.

Sleidia

Technical User
May 4, 2001
1,284
FR
Hi guys,

I need to know what is the fastest/best way to replace a template's custom tags with its content. It's for a CMS.

Until now I was using str_replace but I wonder if there is a better way.

Thanks for the help :)
 
str_replace is ok. ideally with an array of values if you're going to be doing more than one replacement.

alternatively you could use variables with php tags.

I have not tested either method by benchmarking them.

If input parameters are provided via GET method, caching will speed things up significantly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top