Generate xml with php

Hi,
Just wondering if I can generate xml code in xml file below (for a pageflip) with a php while loop so I dont have to manually input pages/ab74.jpg to pages/ab120.jpg and what encoding should the page have?

<content width=“585” height=“827” bgcolor=“cccccc” loadercolor=“ffffff” panelcolor=“5d5d61” buttoncolor=“5d5d61” textcolor=“ffffff”>

<page src=“pages/ab62.jpg”/>
<page src=“pages/ab63.jpg”/>
<page src=“pages/ab64.jpg”/>
<page src=“pages/ab65.jpg”/>
<page src=“pages/ab66.jpg”/>
<page src=“pages/ab67.jpg”/>
<page src=“pages/ab68.jpg”/>
<page src=“pages/ab69.jpg”/>
<page src=“pages/ab70.jpg”/>
<page src=“pages/ab71.jpg”/>
<page src=“pages/ab72.jpg”/>
<page src=“pages/ab73.jpg”/>
<page src=“pages/ab74.jpg”/>
</content>

many thanks

<?php
    echo htmlspecialchars('<content width="585" height="827" bgcolor="cccccc" loadercolor="ffffff" panelcolor="5d5d61" buttoncolor="5d5d61" textcolor="ffffff">
', ENT_QUOTES, 'UTF-8') . '<br />';
    
    for($i = 63; $i <= 120; $i++) {
        echo htmlspecialchars('<page src="pages/ab' . $i . '.jpg"/>', ENT_QUOTES, 'UTF-8') . '<br />';
    }
    
    echo htmlspecialchars('</content>', ENT_QUOTES, 'UTF-8');
?>

Just run this PHP script, and save the output using *.xml filename extension. I’m not sure if this is what you’re looking for. :confused: