Hello and welcome to our community! Is this your first visit?
Results 1 to 2 of 2
  1. #1
    Fanatic Enthusiast Niall's Avatar

    Join Date
    Aug 2007

    Exporting image list to XML


    I'm completely new to PHP and I'm wondering how to do something.
    Say I have a folder full of images, and when I run a php file it'll grab all the images in the folder, put them into a list and export them as an XML file. For example the output would be something like:


    Could anybody provide me with an example of the code and a bit of a walkthrough of how to do it?

  2. #2
    Japanologist Wilio's Avatar

    Join Date
    Dec 2005
    Somewhere in time

    Re: Exporting image list to XML

    the source code from: http://www.laughing-buddha.net/jon/php/dirlist/ explains how to handle files into an array, which is a must.

    As to output it into an XML form.

    $length = count($result);
    echo '<imagelist>';
    echo '<image>'.$result[$i].'</image>';
    echo '</imagelist>';


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts