# Access array object with AMFPHP

**URL:** <https://forum.kirupa.com/t/access-array-object-with-amfphp/303958>\
**Category:** flash\
**Created:** [January 29, 2010, 6:18pm UTC](https://forum.kirupa.com/t/access-array-object-with-amfphp/303958 "2010-01-29T18:18:33Z")\
**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:** [January 29, 2010, 6:18pm UTC](https://forum.kirupa.com/t/access-array-object-with-amfphp/303958/1 "2010-01-29T18:18:33Z")

</div>

I have an array in AS3 that I am sending to AMFPHP

```auto

var myArray:Array = [
					 {type:"text", title:"title 1"},
					 {type:"video", title:"title 2"},
					 {type:"text", title:"title 3"},
					 {type:"video", title:"title 4"}
					 ];

```

In my PHP function I need to loop through the array and get to the objects

```php

for ($i = 0; $i < count($myArray); $i++)
{
	$type = $myArray[$i]['type'];
	$title = $myArray[$i]['title'];
}

```

The above doesnt appear to be working. AMFPHP is returning this error:

```auto

Cannot use string offset as an array

```

Anyone know whats up?
