Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jul 2011
    Posts
    118
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Reverse order of array then post contents

    Ok, so what I basically need to figure out the syntax for is this:

    - Grab the names of each .xml file in a specified directory
    - Set them into an array
    - Reverse the order of the array
    - Call a function which extracts specific elements from the file relative to the first item in the array
    - Repeat this function for the next 4(for example) items in the array, then stop.

    Any ideas?

    Thanks

  • #2
    Senior Coder kbluhm's Avatar
    Join Date
    Apr 2007
    Location
    Philadelphia, PA, USA
    Posts
    1,509
    Thanks
    3
    Thanked 258 Times in 254 Posts
    Well you already have the first 3 steps covered from a previous topic.

    For the 4th step, have a look at http://www.php.net/simplexml

    For the 5th, have a look at my answer in yet another topic, or http://www.php.net/foreach


  •  

    Posting Permissions

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