# Separating 2 variables loaded from PHP/TXT file

**URL:** <https://forum.kirupa.com/t/separating-2-variables-loaded-from-php-txt-file/331113>\
**Category:** Uncategorized\
**Created:** [May 19, 2013, 1:51am UTC](https://forum.kirupa.com/t/separating-2-variables-loaded-from-php-txt-file/331113 "2013-05-19T01:51:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bking20](https://avatars.discourse-cdn.com/v4/letter/b/e495f1/32.png) [@bking20](https://forum.kirupa.com/u/bking20)\
**Post date:** [May 19, 2013, 1:51am UTC](https://forum.kirupa.com/t/separating-2-variables-loaded-from-php-txt-file/331113/1 "2013-05-19T01:51:35Z")

</div>

I’m able to read a .txt file on my server that contains two separate umbers on two separate lines. The .txt file looks like this:

```auto

3
5

```

I’m trying to get those two numbers into my as3 script as separate variables, in this case within an array. Here’s my loader:

```auto

    function loadComplete(e:Event):void 
            {    
                        outputTxt.text = e.target.data;                
                        var stats:Array = outputTxt.text.split("
");
                        trace(String(stats[0]));
            }    

```

But for some reason, both variables load into the first part of the array (stats[0]) and nothing loads into stats[1]. The textfield failed to split into two numbers within the array. Any suggestions?
