The general purpose of PHP is to produce HTML pages.
XML is very similar markup language.
99% of php scripts doing job of creating text pages with data pulled from database.
So, it is possible, and even more - it is what for PHP were invented and designated.
I can’t see much difference beteen two codes.
You can print whatever you wish and with any format you want.
Both code snippets are working PHP codes. You can put it in the php file and just run it.
Save for the first line of the first snippet, which can cause an error under some circumstances.
So, it could be
I will attach what I’m trying to do its easier to explain.
Basically I’m trying to draw a graph in flash which draws in the data from the xml sheet, but, I’m trying to have the values for the different political parties votes come from a mysql table that I have set up.
There are 4 columns, id, conservative, labour, and liberaldemocrat, then in just one row each of the parties has a different value which gets updated via an UPDATE command through php which I have got working.
So basically I just need to create the graph.xml page through php and have the flash document load it correctly, so it draws the graph.