Jump to content

Replacing Variables


a1amattyj

Recommended Posts

Hello,

 

Is str_replace the best way to go about this?

 

In MYSQL, a html template is stored, such that:

 

<table width="{$width}">lots of other ........</table>

 

This is extract from the database, and stored in a string. I would use eval(), but, any user can update this template, so I need to be able to set which variables will be replaced with what the variable is.

 

Thanks!

 

Link to comment
https://forums.phpfreaks.com/topic/211494-replacing-variables/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.