MySQL -> PHP -> Flash

Hi

I am trying to move information from a database to Flash via PHP.

I Have the connection between the db and PHP and Flash.
The problem is that I only can print the last item in my list.

So I made an array.

This is my code:
<?php
////////////// SKICKA INFO TILL FLASH \\\\\\\
$by;
$con = mysql_connect(“localhost”, “root”, “”);
mysql_select_db(“gasstat”, $con);
$res = mysql_query(“SELECT * FROM prodkategory”);
$arr = array();
$i = 0;
while($row = mysql_fetch_object($res))
{
$by=$row -> ProductCategory;

$arr[$i] = “&toFlash=” . $by;
$i++;

}
print("&lenght=$i");

print("&toFlash=$arr");
?>

The problem is this row: print("&toFlash=$arr");

I belive I need to assign the objects in the array, but here I assign the arrayobject.

What I get in my list when I test the movie is “Array” five times.

Someone who knows how I can do?

Cheers