# Send an array to PHP

**URL:** <https://forum.kirupa.com/t/send-an-array-to-php/281863>\
**Category:** flash\
**Created:** [February 13, 2009, 11:45pm UTC](https://forum.kirupa.com/t/send-an-array-to-php/281863 "2009-02-13T23:45:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [February 13, 2009, 11:45pm UTC](https://forum.kirupa.com/t/send-an-array-to-php/281863/1 "2009-02-13T23:45:52Z")

</div>

I am not using AMFPHP or any of those tools, but I was wondering how I could send an array to PHP?

I know I could essentially do a request to my PHP page per item in my array, but I would rather send the array to PHP and then have PHP do the calling to the database.

My array in flash will look like this:

```auto

var data:Array = [
{position:xxx,type:text(or video),title:some title,tcIn:"00:00:00.00",tcOut:"00:00:00.00"},
{position:xxx,type:text(or video),title:some title,tcIn:"00:00:00.00",tcOut:"00:00:00.00"},
{position:xxx,type:text(or video),title:some title,tcIn:"00:00:00.00",tcOut:"00:00:00.00"},
{position:xxx,type:text(or video),title:some title,tcIn:"00:00:00.00",tcOut:"00:00:00.00"},

//etc so on and so on

```

Can I just do the normal URLVariables method:

```auto

var vars:URLVariables = new URLVariables();
vars.theData = data;
var req:URLRequest = new URLRequest("inc/modules/scenarios/playlist_save.php");
req.method = URLRequestMethod.POST;
req.data = vars;

var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE, onDataIn);
loader.load(req);

```

If so how would I parse it in PHP?
