# Loading an array and outputting each element in a textarea every 2 seconds

**URL:** https://forum.kirupa.com/t/loading-an-array-and-outputting-each-element-in-a-textarea-every-2-seconds/114540
**Category:** Uncategorized
**Created:** [June 29, 2004, 3:33pm UTC](https://forum.kirupa.com/t/loading-an-array-and-outputting-each-element-in-a-textarea-every-2-seconds/114540 "2004-06-29T15:33:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![martincrumlish](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@martincrumlish](https://forum.kirupa.com/u/martincrumlish)
#### Post date: [June 29, 2004, 3:33pm UTC](https://forum.kirupa.com/t/loading-an-array-and-outputting-each-element-in-a-textarea-every-2-seconds/114540/1 "2004-06-29T15:33:33Z")

</div>

Hi,

I have a PHP page that outputs a string in this format:

vars=one||two||three||four

I want to load this string into Flash and split it into an array. I was looking at some code on how to do this and I can load the string ok.

Now the tricky part. I want a loop to run through the array every 2 seconds. With each iteration the current value of the array element is displayed in a textarea with a scrollbar. With each iteration the previous content of the textarea remains. Its sort of tacking the content onto the text in the textarea with each iteration.

ie: If I had an array like this myArray(“hello”,"world,“test”);

the loop would produce -\>

iteration1:  
textarea = hello

iteration2:  
textarea = hello  
world

iteration3:  
textarea = hello  
world  
test

Can anyone help me out with this?

Thanks,  
Martin
