18 Replies Latest reply on Sep 14, 2010 7:56 AM by Ned Murphy

    Array Keeps on repeating

    Ron Colmen Level 2

      Is something wrong in this syntax? I'm getting only the first record and it keeps on repeating. When the php file is being tested in the borwser, it shows its data correctly in this format. AA,,BB,,CC,,DD,,

       

      senderLoad.sendAndLoad("http://www.web.com/bb.php",receiveLoad,"POST");

      txt2.html=true;

      receiveLoad.onData = function(src) {

      var msgA:Array = src.split(",,");

      for(var i:Number=0; i<src.length; i++){

      trace(msgA);// RESULT HERE: Repeats AA,BB,CC,DD,

         txt2.htmlText +="<a href='asfunction:loadText,"+msgA[0]+"'>"+msgA[0]+"</a><br>";

           }

      };

       

      RESULT LOOKS LIKE THIS

      AA

      AA

      AA

      AA