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! Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/211494-replacing-variables/#findComment-1102670 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.