Executing code twice
Date: 10/30/05
(PHP Community) Keywords: cms, php, mysql, html, database, sql
I have come across a problem that is driving me mad. I have a php and MySQL CMS and I have a page that extracts the age content (html) out and plops it into the template file and all is sent back to the user. I have now come to the point when I would like to stop some php amongst the body html that is stored for each id in the database. The problem is how to have it recognised as php and then run.
So at the moment, I just extract the in from the database and copy it into a field: $body=$row['body'];
This is then in turn put in the template. I would however like to have this code run and then the result (so the html, plus whatever else has been generated in the middle) is then copied into a field ready for insertion into the template.
Does anyone know of a way to do this? I have seen ways that are meant to have worked, but as yet have not, but I don’t want to note them down as they may cloud people’s ideas.
Thanks for any help.
Source: http://www.livejournal.com/community/php/360920.html