PHP to AS3 help

I have been trying to convert this code to as3 all day and it seems there is an issue with formatiing the array.
if anyone is familiar with php please help. Also i am not sure how to handle the attr post but here is what shows up in the header.

attr%5B0%5D%5Bname%5D : translates to attr[0][name] : this is being set to “amount”
attr%5B0%5D%5Bprice%5D : translates to attr[0][price] : this is being set to “1”

$_POST[‘name’] is beign set to “Sign”
$_POST[‘shipping’] is being set to “1”

you should end up with
YTozOntzOjQ6Im5hbWUiO3M6NDoiU2lnbiI7czo4OiJzaGlwcGluZyI7czoxOiIxIjtzOjQ6ImF0dHIiO2E6MTp7aTowO2E6Mjp7czo0OiJuYW1lIjtzOjY6ImFtb3VudCI7czo1OiJwcmljZSI7czoxOiIxIjt9fX0=|cc90f30e140e4e0859216eb34e0e4fe8

$product_settings = array(
   'name' => $_POST['name'],
   'shipping' => $_POST['shipping'],
   'attr' => ((is_array($_POST['attr'])) ? $_POST['attr'] : array()),
);
                  
$product_settings_encoded = base64_encode(serialize($product_settings));
$hash = md5('my not so s3cret code heh'.$product_settings_encoded);
$product_settings_encoded = $product_settings_encoded . '|' . $hash;