How To Load Rss Into Php?

How can I load dynamic pagecontent from MySQL containing PHP and have that code be evaluated?

  • Hello - I just recently learned PHP and MySQL. I am now in the process of putting together my first page utilizing both of these languages. Currently I have one page, index.php, which takes a page passed by GET and loads the contents of that page from a databse into the body of index. This has been working fine for me until I tried to load a page containing PHP from the database. A page with just HTML or text is loading fine, but when it tries to load PHP from the databse, the PHP is never evaluated. I am figuring this is because PHP already ran and loaded the contents as a string. In order for the PHP to be processed, it would need to make a second pass on the page to get the bodies php. Is there a way I can make PHP execute the code contained in the database that it is loading, rather than just display it as a string?

  • Answer:

    Look at http://us3.php.net/eval Say that the variable that has the PHP value in it is $str. Use this: eval("\$str = \"$str\";");

Evan K at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.