a1amattyj Posted August 23, 2010 Share Posted August 23, 2010 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 More sharing options...
trq Posted August 23, 2010 Share Posted August 23, 2010 Is str_replace the best way to go about this? Yes. Link to comment https://forums.phpfreaks.com/topic/211494-replacing-variables/#findComment-1102670 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.