0 Replies Latest reply on Feb 15, 2011 9:38 AM by flashharry!

    sorting URLVariables so they appear in numeric order.

    flashharry! Level 1

      I'm working on a flex plugin app for a system, replacing an html form with one in flex.
      The form as a lot of dynamic contents so easier to build in flex.
      The issue is the php file i'm posting too is not mine and its encoded so I have to post the data to their requirements.
      I'm redirecting to the encoded php page using URLRequest
      The for contains an array of data in html/javascript you can just use <input type="text" name="option[]" />
      When you submit the form it is transmitted in array order
      [option] => Array
              (
           [0] => Array
      [1] => Array
      [2] => Array
      [3] => Array

      etc

      I can make the array with URLVariables
      var params:URLVariables = new URLVariables();
      params["option[0][name]"]
      params["option[0][special]"]
      params["option[0][join]"]

      params["option[1][name]"]
      params["option[1][special]"]
      params["option[1][join]"]

      params["option[2][name]"]
      params["option[2][special]"]
      params["option[2][join]"]

      But this comes in random order

      [option] => Array
              (
           [3] => Array
      [1] => Array
      [0] => Array
      [2] => Array

      The encoded page will not work unless its in numeric order, there is a perfectly valid reason for this that I won't bore you with.

      Is there anyway to redirect to this php page passing in post data in numeric array order.