# Loading an external array

**URL:** <https://forum.kirupa.com/t/loading-an-external-array/65518>\
**Category:** Uncategorized\
**Created:** [September 27, 2004, 10:30am UTC](https://forum.kirupa.com/t/loading-an-external-array/65518 "2004-09-27T10:30:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![danda](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@danda](https://forum.kirupa.com/u/danda)\
**Post date:** [September 27, 2004, 10:30am UTC](https://forum.kirupa.com/t/loading-an-external-array/65518/1 "2004-09-27T10:30:06Z")

</div>

hi every one,

i’m trying to load an external array generated by php, but it doens’t seems to work.

i’ve changed:

[COLOR=Red]this.pArray = [“1.jpg”, “2.jpg”, “3.jpg”, “4.jpg”, “5.jpg”, “6.jpg”];[/COLOR]

into

[COLOR=Red]loadVariables(‘[http://www.koenvandamme.be/data/php/archive.php?category=exteriors](http://www.koenvandamme.be/data/php/archive.php?category=exteriors)’);

this.pArray = items.split(’,’);  
[/COLOR]

but no images are appearing …  
what am i doing wrong?

[http://www.koenvandamme.be/beta.php](http://www.koenvandamme.be/beta.php)

regards,  
stijn

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 27, 2004, 12:32pm UTC](https://forum.kirupa.com/t/loading-an-external-array/65518/2 "2004-09-27T12:32:05Z")

</div>

you cant load external array like that.  
Make the PHP generate text like:  
1.jpg##2.jpg##3.jpg  
then load that string of text into flash and split into an array using myphpstring.split("##")

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 27, 2004, 1:59pm UTC](https://forum.kirupa.com/t/loading-an-external-array/65518/3 "2004-09-27T13:59:23Z")

</div>

That’s what he’s doing, iloveitaly 🙂

I think that your problem is that you’re trying to split items before it has been loaded. Check the tutorials about LoadVars, they will definitely help. And if this doesn’t solve your problem, please post a bigger piece of your code.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 27, 2004, 4:40pm UTC](https://forum.kirupa.com/t/loading-an-external-array/65518/4 "2004-09-27T16:40:41Z")

</div>

not excatly, he is splitting this:  
[“1.jpg”, “2.jpg”, “3.jpg”, “4.jpg”, “5.jpg”, “6.jpg”];  
into this:  
[“1.jpg”  
“2.jpg”  
ect…  
thats not going to load a pic if you use that string of text through loadMovie() or similiar. you need it to just be:  
1.jpg

or…Maybe i am misunderstanding his problem :pleased:
