SYEDHANIF Posted May 16, 2006 Share Posted May 16, 2006 hiI am having PHP File I need Dyanamically Create XML document in PHP File i.e i have to write source code in php filecan any tell how to do this it is available please send a peace of code that i can understand the logic any have the answer pls let me know it is very urgentregards syedhanif Link to comment Share on other sites More sharing options...
skym Posted May 16, 2006 Share Posted May 16, 2006 You can find a lot of scripts which might help you here:http://www.phpclasses.org/ Link to comment Share on other sites More sharing options...
Little Goat Posted May 16, 2006 Share Posted May 16, 2006 sorry to refer you to another forum, but I dont want to retype everything. anyway, this topic (on the webdeveloper forum) deals with that issue.LGEdit: this actually creates an xml document from an array. it can be multi-demensional. Link to comment Share on other sites More sharing options...
Jack McKalling Posted May 16, 2006 Share Posted May 16, 2006 But basically, you can just echo Xml elements just like with Html elements :) Link to comment Share on other sites More sharing options...
calvin182 Posted May 16, 2006 Share Posted May 16, 2006 i did something like this but I instead of outputting xml in a php file i outputted a php array to a new file. here's what I used, it may help you to create the function you need: $f=fopen("db.php","w"); fwrite($f, str_replace("$", "$", "<?php ".$output."?>")); fclose($f); I doubt you'll need the st_rreplace in there but if you have any special characters that mess up the script like the $ it may be usefull. if the file does not exist, it wil attempt to create it, assuming you have your directory's permissions set so a new file can be created.hope this helps, i didnt go through those other links so if its the same im sorry... im just too lazy haha Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now