title: Send a array from PHP to AS3?
body: <p>Okay. I am using this method to get informations from PHP.</p>
  
  <p>AS3:</p>
  
  <pre><code>function login_check (e:MouseEvent):void {
  
                      /*
                      check fields before sending request to php
                      */
  
                      if (login_username.text == "" || login_password.text == "") {
  
                          /*
                          if username or password fields are empty set error messages
                          */
  
                          if (login_username.text == "") {
  
                          login_username.text = "Enter your username";
  
                          } 
  
                          if (login_password.text == "") {
  
                          login_password.text = "Enter your password";
  
                          }
  
                      } else {
  
                          /*
                          init function to process login
                          */
  
                          login_process();
  
                      }
  
                  }
  
                  /*
                  function to process our login
                  */
  
                  function login_process ():void {
  
                      /*
                      variables that we send to the php file
                      */
  
                      var phpVars:URLVariables = new URLVariables();
  
                      /*
                      we create a URLRequest  variable. This gets the php file path.
                      */
  
                      var phpFileRequest:URLRequest = new URLRequest("php/controlpanel.php");
  
                      /*
                      this allows us to use the post function in php
                      */
  
                      phpFileRequest.method = URLRequestMethod.POST;
  
                      /*
                      attach the php variables to the URLRequest
                      */
  
                      phpFileRequest.data = phpVars;
  
                      /*
                      create a new loader to load and send our urlrequest
                      */
  
                      var phpLoader:URLLoader = new URLLoader();
                      phpLoader.dataFormat = URLLoaderDataFormat.VARIABLES;           
                      phpLoader.addEventListener(Event.COMPLETE, login_result);
  
                      /*
                      now lets create the variables to send to the php file
                      */
  
                      phpVars.systemCall = "login_check";
                      phpVars.login_username = login_username.text;
                      phpVars.login_password = login_password.text;
  
                      /*
                      this will start the communication between flash and php
                      */
  
                      phpLoader.load(phpFileRequest);
  
                  }
  
                  /*
                  function to show the result of the login
                  */
  
                  function login_result (event:Event):void {
  
                      /*
  
                      this autosizes the text field
  
                      ***** You will need to import flash's text classes. You can do this by: 
  
                      import flash.text.*;
  
                      */
  
                      login_result_text.autoSize = TextFieldAutoSize.LEFT;
  
                      /*
                      this gets the output and displays it in the result text field
                      */
  
                      if (event.target.data.login_result == "1") {
                          login_result_text.text = "Login In...";
                          this.gotoAndStop("login_loggedin");
                      }else{
                          login_result_text.text = "Username and password doesn't match.";
                      }
  
                  }
  </code></pre>
  
  <p>PHP:</p>
  
  <pre><code>print "login_registration_status=1";
  </code></pre>
  
  <p>And multiple informations are sent like <code>var1=1&amp;var2=2</code></p>
  
  <p>But, how can I send a array from PHP to AS3?
  And how to handle it with a like while(array) from PHP or something.</p>
  
  <p>Hope someone can help me..</p>