Flash and arrays

i am using this code below to read an array of videos and play them in a sequence. I want to send this array to flash from PHP, how would i go about this?
The array is the videoList and i want to be able to dynamicaly load this.

myVideo.playPauseButton = play_paus_btn;
myVideo.muteButton = mute_btn;

import mx.video.*;

var videoList:Array = new Array();

videoList[0] = "blue.flv";
videoList[1] = "red.flv";
videoList[2] = "green.flv";
videoList[3] = "purple.flv";
videoList[4] = "yellow.flv";

var currentlyPlaying = 0;

// Initialize first play
myVideo.contentPath = videoList[currentlyPlaying]; // Changed this as it is a specific function for changing the file
myVideo.play(); // Should start the player without the parameters from the component

var listenerObject:Object = new Object(); // create listener object
listenerObject.complete = function(eventObject:Object):Void {
		//if (currentlyPlaying > videoList.length) {  // Resets counter if reaches end of array
			//currentlyPlaying = 0;
		trace(currentlyPlaying); // Just traces new file in testing
		myVideo.contentPath = videoList[currentlyPlaying]; // Change source file
		myVideo.play(); // Play new file
myVideo.addEventListener("complete", listenerObject); // Initialize listener

thank you for any help