Nested MySQL query - getting Array as output
===

I am starting with the answer on this page http://stackoverflow.com/questions/357122/php-mysql-how-to-fetch-nested-rows-into-multidimensinal-array because I am working with the same kind of relationship between tables. My code now looks like this:
	$query=sprintf("SELECT * FROM product INNER JOIN production ON product.ID = production.product_ID");
	$data = mysql_query($query);
	$products = array();
	
	while ($row = mysql_fetch_assoc($data))
	{
	    if (!isset($products[$row['product_ID']]))
	    {
	        $row['production'] = array();
	        $products[$row['product_ID']] = $row;
	    }
	
	    $products[$row['product_ID']]['production'][] = $row;
	}
	
	foreach ($products as $product)
	{
	    foreach ($product['production'] as $item)
	        //... do stuff
	}
The query is solid - I have tried this directly on the database.
My problem is that I can't work out the final bit where it says //... do stuff
No matter what combination of variables etc I stick in there I get ArrayArrayArray (etc). What I want is to get a table of output which I can work with.
I hope this is enough information, this is my first question on StackOverflow. Thank you. 