How to create an xml file dynamically in PHP
XML stands for eXtensible Markup Language. XML is designed to transport and store data. XML is important to know, and very easy to learn. You should have a basic understanding of HTML and Javascript. The difference between HTML and XML is that HTML is about displaying information, while XML is about carrying information. XML does not do anything, XML was created to structure, store and transport information. XML has no predefined tags so you can invent your own.
db->prepare($sql);
$stmt->execute();
$items = $stmt->fetchAll(PDO::FETCH_ASSOC);
echo "";
echo '';
for($i = 0; $i < count($items); $i++){
echo '';
echo '';
echo $items[$i]['title'];
echo '';
echo '';
echo $items[$i]['description'];
echo '';
echo '';
echo $items[$i]['date'];
echo '';
echo '';
echo $items[$i]['author'];
echo '';
echo '';
}
echo '';
?>
You could then create a cronjob that will automatically execute the page every so often.
- I will create software & web applications for donations. Please get in touch and let me know what I can do for you!
About Me
Hello, I am Jonathan Devine.
My main interests include philosophy, psychology, economics, and problem solving. This blog is mostly about my learning in Software Development.
My hope is this blog will allow me to share my learning experience with other programmers and accelerate my own discovery in the process.
Quotes I Like
The Unexamined Life is Not Worth Living
— SocratesMy Hangouts
Categories
- Hobbies (1)
- Media (1)
- Philosophy (1)
- Programming (2)
- Uncategorized (1)





