Friday, April 2, 2010

PHP Code for XML

At my current job I'm writing a lot of PHP scripts to take the load off of our programmers and pass that load to our art dept. Much of the data gets passed as static XML files, which I'm converting to dynamic XML from MySQL via PHP, using the following code:


//The big one to make PHP spit it out as XML

header("Content-type: text/xml");



$sql_query="SELECT * FROM configTable";


Not the cleanest code, I know, but it works.

No comments:

Post a Comment