# Parsing External Array Data Tutorial - Help!

**URL:** https://forum.kirupa.com/t/parsing-external-array-data-tutorial-help/164399
**Category:** programming
**Created:** [September 30, 2005, 8:05pm UTC](https://forum.kirupa.com/t/parsing-external-array-data-tutorial-help/164399 "2005-09-30T20:05:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fx2ooo](https://avatars.discourse-cdn.com/v4/letter/f/ba8739/32.png) [@fx2ooo](https://forum.kirupa.com/u/fx2ooo)
#### Post date: [September 30, 2005, 8:05pm UTC](https://forum.kirupa.com/t/parsing-external-array-data-tutorial-help/164399/1 "2005-09-30T20:05:05Z")

</div>

I’m having trouble with this tutorial [here](http://www.kirupa.com/developer/mx2004/external_array.htm).

My actionscript is exactly the same, but I’ve added a dynamic text field and some traces to help debug:

```auto

files = new Array();
lv = new LoadVars();
lv.onLoad = function() {
	trace("loaded");
	fl = this.filelist;
	trace("filelist " + fl);
	files = fl.split(",");
	c = files.length - 1;
	trace("c="+c);
	for (i = 0; i < c; i++) {
		trace("file " + files*);
		fileName_txt.text = files*; // dynamic text field
	}
};
lv.load("files.php");

```

My php reads the ‘img’ directory, again exactly the same otherwise:

```php

<?php 
if ($handle = opendir('img')) { 
echo "filelist=";
while (false !== ($file = readdir($handle))) { 
$ext = substr(strrchr($file, "."), 1);
if ($file != "." && $file != ".." && $ext == "jpg") { 
echo "$file";
echo ",";
}
} 
closedir($handle);
echo "null";
} 
?>

```

When I trace ‘fl’ it comes back undefined, but I’m not very good at php so I can’t figure out what’s wrong. Can someone help?

Adam
