i’m trying to get my Array to look like
[1] => Array
(
[0] => Red
[1] => Green
[2] => Blue
)
[2] => Array
(
[0] => Small
[1] => Medium
[2] => Large
)
[3] => Array
(
[0] => Whatever
)
Below is what i’m getting
Array
(
[0] => Array
(
[1] => 3X-Large
)
)
Array
(
[0] => Array
(
[1] => 3X-Large
)
[1] => Array
(
[1] => Extra Large
)
)
Array
(
[0] => Array
(
[1] => 3X-Large
)
[1] => Array
(
[1] => Extra Large
)
[2] => Array
(
[1] => Large
)
)
Array
(
[0] => Array
(
[1] => 3X-Large
)
[1] => Array
(
[1] => Extra Large
)
[2] => Array
(
[1] => Large
)
[3] => Array
(
[1] => Medium
)
)
Array
(
[0] => Array
(
[1] => 3X-Large
)
[1] => Array
(
[1] => Extra Large
)
[2] => Array
(
[1] => Large
)
[3] => Array
(
[1] => Medium
)
[4] => Array
(
[2] => Green
)
)
Array
(
[0] => Array
(
[1] => 3X-Large
)
[1] => Array
(
[1] => Extra Large
)
[2] => Array
(
[1] => Large
)
[3] => Array
(
[1] => Medium
)
[4] => Array
(
[2] => Green
)
[5] => Array
(
[1] => Small
)
)
Array
(
[0] => Array
(
[1] => 3X-Large
)
[1] => Array
(
[1] => Extra Large
)
[2] => Array
(
[1] => Large
)
[3] => Array
(
[1] => Medium
)
[4] => Array
(
[2] => Green
)
[5] => Array
(
[1] => Small
)
[6] => Array
(
[2] => Red
)
)
Array
(
[0] => Array
(
[1] => 3X-Large
)
[1] => Array
(
[1] => Extra Large
)
[2] => Array
(
[1] => Large
)
[3] => Array
(
[1] => Medium
)
[4] => Array
(
[2] => Green
)
[5] => Array
(
[1] => Small
)
[6] => Array
(
[2] => Red
)
[7] => Array
(
[1] => Small
)
)
Array
(
[0] => Array
(
[1] => 3X-Large
)
[1] => Array
(
[1] => Extra Large
)
[2] => Array
(
[1] => Large
)
[3] => Array
(
[1] => Medium
)
[4] => Array
(
[2] => Green
)
[5] => Array
(
[1] => Small
)
[6] => Array
(
[2] => Red
)
[7] => Array
(
[1] => Small
)
[8] => Array
(
[1] => Medium
)
)
Array
(
[0] => Array
(
[1] => 3X-Large
)
[1] => Array
(
[1] => Extra Large
)
[2] => Array
(
[1] => Large
)
[3] => Array
(
[1] => Medium
)
[4] => Array
(
[2] => Green
)
[5] => Array
(
[1] => Small
)
[6] => Array
(
[2] => Red
)
[7] => Array
(
[1] => Small
)
[8] => Array
(
[1] => Medium
)
[9] => Array
(
[1] => Large
)
)
Array
(
[0] => Array
(
[1] => 3X-Large
)
[1] => Array
(
[1] => Extra Large
)
[2] => Array
(
[1] => Large
)
[3] => Array
(
[1] => Medium
)
[4] => Array
(
[2] => Green
)
[5] => Array
(
[1] => Small
)
[6] => Array
(
[2] => Red
)
[7] => Array
(
[1] => Small
)
[8] => Array
(
[1] => Medium
)
[9] => Array
(
[1] => Large
)
[10] => Array
(
[1] => Extra Large
)
)
Array
(
[0] => Array
(
[1] => 3X-Large
)
[1] => Array
(
[1] => Extra Large
)
[2] => Array
(
[1] => Large
)
[3] => Array
(
[1] => Medium
)
[4] => Array
(
[2] => Green
)
[5] => Array
(
[1] => Small
)
[6] => Array
(
[2] => Red
)
[7] => Array
(
[1] => Small
)
[8] => Array
(
[1] => Medium
)
[9] => Array
(
[1] => Large
)
[10] => Array
(
[1] => Extra Large
)
[11] => Array
(
[1] => 2X-Large
)
)
Array
(
[0] => Array
(
[1] => 3X-Large
)
[1] => Array
(
[1] => Extra Large
)
[2] => Array
(
[1] => Large
)
[3] => Array
(
[1] => Medium
)
[4] => Array
(
[2] => Green
)
[5] => Array
(
[1] => Small
)
[6] => Array
(
[2] => Red
)
[7] => Array
(
[1] => Small
)
[8] => Array
(
[1] => Medium
)
[9] => Array
(
[1] => Large
)
[10] => Array
(
[1] => Extra Large
)
[11] => Array
(
[1] => 2X-Large
)
[12] => Array
(
[1] => 2X-Large
)
)
this is my PHP script
if (count($product->productInfo))
{
foreach ($product->productInfo as $thisProductInfoID => $thisInfo)
{
// print_array($thisInfo);
if (count($thisInfo->attributes))
{
//print_array($thisInfo->attributes);
foreach ($thisInfo->attributes as $thisAttributeID => $thisAttributeInfo)
{
$AttributeColors[][$thisAttributeID]=$thisAttributeInfo['genValue'];
print_array($AttributeColors);
//print_array($thisAttributeInfo);
if (!isset($attributesArr[$thisAttributeID]) || !in_array($thisAttributeInfo['genValue'], $attributesArr[$thisAttributeID]))
$attributesArr[$thisAttributeID][]=$thisAttributeInfo['genValue'];
// print_array($attributesArr[$thisAttributeID]);
}
}
}
}