PHP Array GET parent and child - php

Hello I Have this Array from a dataset:
Example:
array (
1 =>
array (
'id' => '1',
'name' => ' Category',
'id_parent' => '0',
'ativo' => '1',
),
2 =>
array (
'id' => '2',
'name' => ' Slippers',
'id_parent' => '0',
'ativo' => '1',
),
3 =>
array (
'id' => '3',
'name' => ' TShirts',
'id_parent' => '0',
'ativo' => '1',
),
4 =>
array (
'id' => '4',
'name' => ' BlousesSweatshirt',
'id_parent' => '0',
'ativo' => '1',
),
5 =>
array (
'id' => '5',
'name' => ' Cap',
'id_parent' => '0',
'ativo' => '1',
),
6 =>
array (
'id' => '6',
'name' => ' Stickers',
'id_parent' => '0',
'ativo' => '1',
),
7 =>
array (
'id' => '7',
'name' => ' ScreensandFrames',
'id_parent' => '0',
'ativo' => '1',
),
8 =>
array (
'id' => '8',
'name' => ' Models',
'id_parent' => '0',
'ativo' => '1',
),
9 =>
array (
'id' => '9',
'name' => ' Notebook',
'id_parent' => '6',
'ativo' => '1',
),
10 =>
array (
'id' => '10',
'name' => ' Door',
'id_parent' => '0',
'ativo' => '1',
),
11 =>
array (
'id' => '11',
'name' => ' Door',
'id_parent' => '6',
'ativo' => '1',
),
12 =>
array (
'id' => '12',
'name' => ' Kangaroo',
'id_parent' => '4',
'ativo' => '1',
),
13 =>
array (
'id' => '13',
'name' => ' KangarooRaglan',
'id_parent' => '4',
'ativo' => '1',
),
14 =>
array (
'id' => '14',
'name' => ' RoundCollar',
'id_parent' => '4',
'ativo' => '1',
),
15 =>
array (
'id' => '15',
'name' => ' Trucker',
'id_parent' => '5',
'ativo' => '1',
),
16 =>
array (
'id' => '16',
'name' => ' Basic',
'id_parent' => '3',
'ativo' => '1',
),
17 =>
array (
'id' => '17',
'name' => ' Longline',
'id_parent' => '3',
'ativo' => '1',
),
18 =>
array (
'id' => '18',
'name' => ' Raglan',
'id_parent' => '3',
'ativo' => '1',
),
19 =>
array (
'id' => '19',
'name' => ' Raglan3/4',
'id_parent' => '3',
'ativo' => '1',
),
20 =>
array (
'id' => '20',
'name' => ' Regatta',
'id_parent' => '3',
'ativo' => '1',
),
21 =>
array (
'id' => '21',
'name' => ' Slide',
'id_parent' => '2',
'ativo' => '1',
),
22 =>
array (
'id' => '22',
'name' => ' Stickers',
'id_parent' => '8',
'ativo' => '1',
),
23 =>
array (
'id' => '23',
'name' => ' Notebook',
'id_parent' => '22',
'ativo' => '1',
),
24 =>
array (
'id' => '24',
'name' => ' T-shirt',
'id_parent' => '8',
'ativo' => '1',
),
25 =>
array (
'id' => '25',
'name' => ' Basic',
'id_parent' => '24',
'ativo' => '1',
),
26 =>
array (
'id' => '26',
'name' => ' Slippers',
'id_parent' => '8',
'ativo' => '1',
),
27 =>
array (
'id' => '27',
'name' => ' Slide',
'id_parent' => '26',
'ativo' => '1',
),
28 =>
array (
'id' => '28',
'name' => ' 1Screen',
'id_parent' => '7',
'ativo' => '1',
),
29 =>
array (
'id' => '29',
'name' => ' Set3Screens',
'id_parent' => '7',
'ativo' => '1',
),
30 =>
array (
'id' => '30',
'name' => ' Set5Screens',
'id_parent' => '7',
'ativo' => '1',
),
31 =>
array (
'id' => '31',
'name' => ' BlousesSweatshirt',
'id_parent' => '8',
'ativo' => '1',
),
32 =>
array (
'id' => '32',
'name' => ' Cap',
'id_parent' => '8',
'ativo' => '1',
),
33 =>
array (
'id' => '33',
'name' => ' ScreensandFrames',
'id_parent' => '8',
'ativo' => '1',
),
)
Whereas this array we have fathers and childs,
example:
-EX:[1] Models is father of: Stickers, T-shirt, Slippers
-EX:[2] Stickers is father of: Notebook
What I need is a function to get Model and all Childrens (till end) recursively:
I've already done a function to get Recursive Fathers from the Notebook, for example:
here:
function returnParent($id, $haystack, $arr = null){
$needle = $haystack[$id];
$arr[] = $needle;
if($needle['id_parent']){
return returnParent($needle['id_parent'], $haystack, $arr);
}else{
return $arr;
}
}
where $id = 23 and $haystack is complete dataset.
result:
Array
(
[0] => Array
(
[id] => 23
[name] => Notebook
[id_parent] => 22
)
[1] => Array
(
[id] => 22
[name] => Stickers
[id_parent] => 8
)
[2] => Array
(
[id] => 8
[name] => models
[id_parent] => 0
)
)
The result of function to return childrens needs to be the same of returnParent, the looked up value need to be in array as key 0;
complete dataset here:
https://pastebin.com/jgTM7aLA
suggestions to make my function better is very wellcome :)
EDIT
Expected output:
0 =>
array (
'id' => '8',
'name' => ' Models',
'id_parent' => '0',
'ativo' => '1',
),
1 =>
array (
'id' => '6',
'name' => ' Stickers',
'id_parent' => '0',
'ativo' => '1',
),
2 =>
array (
'id' => '9',
'name' => ' Notebook',
'id_parent' => '6',
'ativo' => '1',
),
3 =>
array (
'id' => '24',
'name' => ' T-shirt',
'id_parent' => '8',
'ativo' => '1',
),
4 =>
array (
'id' => '25',
'name' => ' Basic',
'id_parent' => '24',
'ativo' => '1',
)... and ..etc
Something like that, the key 0 must be the searched value, and the others values, dont need to be in tree order, any order its ok, as long as get all values.
in other words:
get a array node, show him and all childrens and grandchildrens.

function returnChild($id, $haystack, $arr = []){
$needle = $haystack[$id];
array_push($arr, $needle);
foreach($haystack as $key){
if($key['id_parent'] == $needle['id']){
array_push($arr,returnChild($key['id'], $haystack));
}
}
return $arr;
}
I hope this is the solution to your problem!

I believe this is what you are looking for.
I loop the unique parents and find what items have a matching parent.
I had to add a "NULL" value to parents and IDs because your array is not zero indexed.
That took me a long time to figure out...
Anyways the return is a 'parent' array and children below.
$temp = array_column($arr, "id");
$ids[0] = "NULL";
$ids = array_merge($ids, $temp);
$temp = array_column($arr, "id_parent");
$parents[0] = "NULL";
$parents = array_merge($parents, $temp);
Foreach(array_unique($parents) as $parent){
if($parent ==0) continue; // if parent is 0 we don't need to search for it (I think)
$new[$parent]['parent'] = $arr[$parent];
$new[$parent]['children'] = array_intersect_key($arr, array_intersect($parents, [$parent]));
}
Var_dump($new);
https://3v4l.org/Fbet4

Related

group unique values in multidimensional array

I have an array of RestroreModels
if the RestoreCode value exists multiple times in array. Based on unique restore I want to add the TotalCharge value and put the associated model with that RestoreCode in a new array. if the RestoreCode value exist only once put as it is with single model in array.
$RestroreModels = array (
0 =>
array (
'TotalCharge' => '3',
'RestoreCode' => 'FF 0',
'Model' => 'iPhone 7',
),
1 =>
array (
'TotalCharge' => '2',
'RestoreCode' => 'LT 2015',
'Model' => 'iPad Mini 2',
),
2 =>
array (
'TotalCharge' => '2',
'RestoreCode' => 'LT 4013',
'Model' => 'iPhone 6',
),
3 =>
array (
'TotalCharge' => '2',
'RestoreCode' => 'LT 4013',
'Model' => 'ipod touch',
),
4 =>
array (
'TotalCharge' => '2',
'RestoreCode' => 'P 21',
'Model' => 'iPhone 7',
),
5 =>
array (
'TotalCharge' => '2',
'RestoreCode' => 'AL 2015',
'Model' => 'iPhone 7',
),
6 =>
array (
'TotalCharge' => '2',
'RestoreCode' => 'AL 0',
'Model' => 'ipod touch',
),
7 =>
array (
'TotalCharge' => '1',
'RestoreCode' => 'LT 2015',
'Model' => 'iPad Mini',
),
8 =>
array (
'TotalCharge' => '1',
'RestoreCode' => 'LT 4005',
'Model' => 'iPad Mini',
),
9 =>
array (
'TotalCharge' => '1',
'RestoreCode' => 'P 21',
'Model' => 'iPad 5',
),
10 =>
array (
'TotalCharge' => '1',
'RestoreCode' => 'LT 4013',
'Model' => 'iPhone 7+',
)
);
i want the result like this
$RestroreModels = array (
0 =>
array (
'TotalCharge' => '4',
'RestoreCode' => 'LT 2015',
'Model' => array ('iPad Mini 2', 'iPhone 7')
),
1 =>
array (
'TotalCharge' => '3',
'RestoreCode' => 'LT 4013',
'Model' => array ('iPhone 7+', 'ipod touch', 'iPad Mini 2')
),
2 =>
array (
'TotalCharge' => '3',
'RestoreCode' => 'P 21',
'Model' => array ('iPad Mini 2', 'iPhone 7', 'iPad 5')
),
3 =>
array (
'TotalCharge' => '2',
'RestoreCode' => 'AL 2015',
'Model' => array ('iPhone 7'),
),
4 =>
array (
'TotalCharge' => '2',
'RestoreCode' => 'AL 0',
'Model' => array ('ipod touch'),
),
5 =>
array (
'TotalCharge' => '1',
'RestoreCode' => 'LT 4005',
'Model' => array ('iPad Mini'),
),
);
I have Tried this so far i am able to get unique values but not sure how to add add TotalCharge and put model related to RestoreCode in $final_array.
$final_array = array();
$keys_array = array();
foreach ($RestroreModels as $key => $value) {
if (!in_array($value['RestoreCode'], $keys_array)) {
$keys_array[$key] = $value['RestoreCode'];
$final_array[$key] = $value;
}
}
var_dump ($final_array);
die();
Taking the note if the RestoreCode value exist only once put as it is with single model in array into account, I think you might use a foreach loop and store the RestoreCode of a single array as the key in the result array. Note that the result will differ from your wanted result as the item with a single RestoreCode will also be in the result.
Per iteration check if that key already exists. If if does not, add it and put the value for the Model in a new array.
If it does exist, add the values for TotalCharge. To get the unique values for the Models, check if the current array for Model already contains it.
If you want to reset the keys, you could use array_values.
$res = [];
foreach ($RestroreModels as $item) {
if (isset($res[$item["RestoreCode"]])) {
if (!in_array($item["Model"], $res[$item["RestoreCode"]]["Model"], true)) {
$res[$item["RestoreCode"]]["Model"][] = $item["Model"];
}
$res[$item["RestoreCode"]]["TotalCharge"] += $item["TotalCharge"];
} else {
$item["Model"] = [$item["Model"]];
$res[$item["RestoreCode"]] = $item;
}
}
print_r(array_values($res));
Php demo

PHP - Merge more than 2 arrays

I'm trying to make the values in the EVENTNAME array the key of the arrays below it.
I want to be able to do a foreach on on a php variable and get the EVENTNAME and the count for its IMMIGRATIONS, EFFECTS and SUPPLYCHAINS.
$keyevents = oci_parse($conn, "SELECT EVENTNAME FROM KEYEVENTS GROUP BY EVENTNAME");
oci_execute($keyevents);
oci_fetch_all($keyevents, $keyevent);
$immigrations = oci_parse($conn, "SELECT COUNT(*) IMMIGRATIONS FROM KEYEVENTS LEFT JOIN IMMIGRATION ON KEYEVENTS.EVENTID = IMMIGRATION.EVENTID GROUP BY EVENTNAME");
oci_execute($immigrations);
oci_fetch_all($immigrations, $imm);
$effects = oci_parse($conn, "SELECT COUNT(*) EFFECTS FROM KEYEVENTS LEFT JOIN EFFECT ON KEYEVENTS.EVENTID = EFFECT.EVENTID GROUP BY EVENTNAME");
oci_execute($effects);
oci_fetch_all($effects, $eff);
$supplychains = oci_parse($conn, "SELECT COUNT(*) SUPPLYCHAINS FROM KEYEVENTS LEFT JOIN SUPPLYCHAINS ON KEYEVENTS.EVENTID = SUPPLYCHAINS.EVENTID GROUP BY EVENTNAME");
oci_execute($supplychains);
oci_fetch_all($supplychains, $supp);
$stats = array_merge($keyevent, $imm, $eff, $supp);
highlight_string("<?php\n\$stats =\n" . var_export($stats, true) . ";\n?>");
var_export
array (
'EVENTNAME' =>
array (
0 => 'Brexit',
1 => 'leave date set',
2 => 'leave date ',
3 => 'deal or no deal',
),
'IMMIGRATIONS' =>
array (
0 => '1',
1 => '1',
2 => '1',
3 => '1',
),
'EFFECTS' =>
array (
0 => '2',
1 => '1',
2 => '1',
3 => '2',
),
'SUPPLYCHAINS' =>
array (
0 => '1',
1 => '1',
2 => '1',
3 => '1',
),
)
I assume you don't know the key names and use array_keys to figure it out.
Then I loop the first subarray and use the key in array_column to get the other values.
Your expected output does not include associative keys in the subarray, but if you need it use the second code.
$arr = array ( 'EVENTNAME' => array ( 0 => 'Brexit', 1 => 'leave date set', 2 => 'leave date ', 3 => 'deal or no deal', ), 'IMMIGRATIONS' => array ( 0 => '1', 1 => '1', 2 => '1', 3 => '1', ), 'EFFECTS' => array ( 0 => '2', 1 => '1', 2 => '1', 3 => '2', ), 'SUPPLYCHAINS' => array ( 0 => '1', 1 => '1', 2 => '1', 3 => '1', ), );
$keys = array_keys($arr);
foreach($arr[$keys[0]] as $key => $val){
$result[$val] = array_column(array_slice($arr,1), $key);
}
var_export($result)
Output:
array (
'Brexit' =>
array (
0 => '1',
1 => '2',
2 => '1',
),
'leave date set' =>
array (
0 => '1',
1 => '1',
2 => '1',
),
'leave date ' =>
array (
0 => '1',
1 => '1',
2 => '1',
),
'deal or no deal' =>
array (
0 => '1',
1 => '2',
2 => '1',
),
)
https://3v4l.org/Seteg
$keys = array_keys($arr);
foreach($arr[$keys[0]] as $key => $val){
$result[$val] = array_combine(array_slice($keys, 1), array_column(array_slice($arr,1), $key));
}
var_export($result);
Output:
array (
'Brexit' =>
array (
'IMMIGRATIONS' => '1',
'EFFECTS' => '2',
'SUPPLYCHAINS' => '1',
),
'leave date set' =>
array (
'IMMIGRATIONS' => '1',
'EFFECTS' => '1',
'SUPPLYCHAINS' => '1',
),
'leave date ' =>
array (
'IMMIGRATIONS' => '1',
'EFFECTS' => '1',
'SUPPLYCHAINS' => '1',
),
'deal or no deal' =>
array (
'IMMIGRATIONS' => '1',
'EFFECTS' => '2',
'SUPPLYCHAINS' => '1',
),
)
https://3v4l.org/aPCub

Flat array to a hierarchical multi-dimensional array

I have an flat array that looks like this exemple :
array (
0 =>
array (
'TreePad_Fields' =>
array (
'#ID' => '1',
'#NAME' => '[CDATA[nomenclature exemple]]',
'#LEVEL' => '0',
),
),
1 =>
array (
'TreePad_Fields' =>
array (
'#ID' => '3',
'#NAME' => '[CDATA[droit]]',
'#LEVEL' => '1',
),
),
2 =>
array (
'TreePad_Fields' =>
array (
'#ID' => '13',
'#NAME' => '[CDATA[législation]]',
'#LEVEL' => '2',
),
),
3 =>
array (
'TreePad_Fields' =>
array (
'#ID' => '14',
'#NAME' => '[CDATA[statuts]]',
'#LEVEL' => '3',
),
),
4 =>
array (
'TreePad_Fields' =>
array (
'#ID' => '15',
'#NAME' => '[CDATA[projets de loi]]',
'#LEVEL' => '4',
),
),
5 =>
array (
'TreePad_Fields' =>
array (
'#ID' => '16',
'#NAME' => '[CDATA[réglementations]]',
'#LEVEL' => '2',
),
),
6 =>
array (
'TreePad_Fields' =>
array (
'#ID' => '17',
'#NAME' => '[CDATA[instruments statutaires]]',
'#LEVEL' => '3',
),
),
7 =>
array (
'TreePad_Fields' =>
array (
'#ID' => '2',
'#NAME' => '[CDATA[économie]]',
'#LEVEL' => '1',
),
),
8 =>
array (
'TreePad_Fields' =>
array (
'#ID' => '8',
'#NAME' => '[CDATA[analyse cout-avantage]]',
'#LEVEL' => '2',
),
),
9 =>
array (
'TreePad_Fields' =>
array (
'#ID' => '6',
'#NAME' => '[CDATA[analyse socio-économique]]',
'#LEVEL' => '2',
),
),
)
and I would like to have like this :
$data = array(
'[CDATA[nomenclature exemple]]' => array(
'[CDATA[droit]]' => array(
'[CDATA[législation]]' => array(
'[CDATA[statuts]]' => array(
'[CDATA[projets de loi]]'
),
),
'[CDATA[réglementations]]' => array(
'[CDATA[instruments statutaires]]'
),
),
'[CDATA[économie]]' => array(
'[CDATA[analyse cout-avantage]]',
'[CDATA[analyse socio-économique]]',
),
)
);
I can't figure out how to do it. I've found other examples here for converting flattened arrays into multidimensional ones but not where there's a custom child like this.
I should say it is a bit inconsistent to want to have the leaves in the datastructure have the [CDATA...] name as value of an indexed array, while in the rest of the tree they are keys.
So, I would suggest to make those leaves also keyed by the [CDATA...] name, but just with an empty array as value. That way the structure is consistent throughout.
For that structure you could use this function:
function buildTree($data) {
foreach($data as $i => $row) {
$arr = $row['TreePad_Fields'];
$level = $arr['#LEVEL'];
$key = $arr['#NAME'];
$levels[$level][$key] = [];
$levels[$level+1] = &$levels[$level][$key];
}
return $levels[0];
}
Call it like this:
$result = buildTree($data);
For the sample data given, the result would be:
array (
'[CDATA[nomenclature exemple]]' => array (
'[CDATA[droit]]' => array (
'[CDATA[législation]]' => array (
'[CDATA[statuts]]' => array (
'[CDATA[projets de loi]]' => array (),
),
),
'[CDATA[réglementations]]' => array (
'[CDATA[instruments statutaires]]' => array (),
),
),
'[CDATA[économie]]' => array (
'[CDATA[analyse cout-avantage]]' => array (),
'[CDATA[analyse socio-économique]]' => array (),
),
),
)
See it run on eval.in

changing array id in an multidimensional array with another array in php

I have 2 arrays:
$myArray = array ( 'name' => 'Dollar', 'sign' => '$', 'format' => '1', 'decimals' => '1', 'conversion_rate' => '1.324400' );
$myArrayNew = array ( 0 => 'Name', 1 => 'Sign', 2 => 'Format', 3 => 'Decimals', 4 => 'Conversion Rate');
When i use
$combinedarrays = array_combine($myArrayNew, $myArray);
the output is
Array ( [Name] => Dollar [Sign] => $ [Format] => 1 [Decimals] => 1 [Conversion Rate] => 1.324400 )
That is what I need, but the problem is when my first array is multidimensional like:
$myArray = array( array ( 'name' => 'Dollar', 'sign' => '$', 'format' => '1', 'decimals' => '1', 'conversion_rate' => '1.324400' ),
array ( 'name' => 'Euro', 'sign' => '€', 'format' => '2', 'decimals' => '1', 'conversion_rate' => '1.000000' ));
So, how to change the keys to be like below?
$myArray = array( array ( 'Name' => 'Dollar', 'Sign' => '$', 'Format' => '1', 'Decimals' => '1', 'Conversion Rate' => '1.324400' ),
array ( 'Name' => 'Euro', 'Sign' => '€', 'Format' => '2', 'Decimals' => '1', 'Conversion Rate' => '1.000000' ));
You need to loop on sub arrays.
Try this:
$myArrayNew = array ( 0 => 'Name', 1 => 'Sign', 2 => 'Format', 3 => 'Decimals', 4 => 'Conversion Rate');
$myArray = array( array ( 'name' => 'Dollar', 'sign' => '$', 'format' => '1', 'decimals' => '1', 'conversion_rate' => '1.324400' ),
array ( 'name' => 'Euro', 'sign' => '€', 'format' => '2', 'decimals' => '1', 'conversion_rate' => '1.000000' ));
$combinedarrays = array();
foreach($myArray as $subarr)
$combinedarrays[] = array_combine($myArrayNew, $subarr);
print_r($combinedarrays);

Incomplete Data from json_decode

Okay some basic info...
PHP 5.3.5
JSON 1.2.1
This is all running on a local XAMPP server. Basically, my code below is returning an incomplete associative array. The json_last_error() returns 0. I have searched the net but could not find this type of error without haveing a specific json error returned.
<?php
$ShippingObj = json_decode($_POST['formData'], true);
echo json_last_error();
echo $ShippingObj;
I have validated the string with JSONLint..and here is what its output was....
array (
'name' => 'newShipment',
'comments' => '',
'count' => 1,
'itemID' => 0,
'itemWeight' => 7.548,
'itemLength' => 0,
'itemWidth' => 0,
'itemHeight' => 0,
'limits' => '',
'collection' =>
array (
0 =>
array (
'name' => '8x6x4 Standard',
'comments' => '',
'count' => 5,
'itemID' => '3',
'itemWeight' => 7.5475,
'itemLength' => '8',
'itemWidth' => '6',
'itemHeight' => '4',
'limits' => 'MFR',
'collection' =>
array (
0 =>
array (
'ID' => '1',
'Name' => ' TA-200 Demarcation Enclosure',
'Qty' => 1,
'Weight' => '0.34',
),
1 =>
array (
'ID' => '2',
'Name' => ' CG-1000 Demarcation Enclosure',
'Qty' => 4,
'Weight' => '1',
),
2 =>
array (
'ID' => '19',
'Name' => ' FM-02 Stereo FM Transmitter',
'Qty' => 1,
'Weight' => '0.1625',
),
3 =>
array (
'ID' => '20',
'Name' => ' Renard 64 Rev XC Parts Kit w/PCB',
'Qty' => 1,
'Weight' => '1.125',
),
4 =>
array (
'ID' => '21',
'Name' => ' SSRez Parts Kit w/PCB - Set of 8',
'Qty' => 2,
'Weight' => '0.86',
),
),
),
),
)
Which is a valid JSON construct.....here is the input that I copied into http://www.functions-online.com/json_decode.html to verify my string.
$returnValue = json_decode('{"name":"newShipment","comments":"","count":1,"itemID":0,"itemWeight":7.548,"itemLength":0,"itemWidth":0,"itemHeight":0,"limits":"","collection":{"0":{"name":"8x6x4 Standard","comments":"","count":5,"itemID":"3","itemWeight":7.5475,"itemLength":"8","itemWidth":"6","itemHeight":"4","limits":"MFR","collection":{"0":{"ID":"1","Name":" TA-200 Demarcation Enclosure","Qty":1,"Weight":"0.34"},"1":{"ID":"2","Name":" CG-1000 Demarcation Enclosure","Qty":4,"Weight":"1"},"2":{"ID":"19","Name":" FM-02 Stereo FM Transmitter","Qty":1,"Weight":"0.1625"},"3":{"ID":"20","Name":" Renard 64 Rev XC Parts Kit w/PCB","Qty":1,"Weight":"1.125"},"4":{"ID":"21","Name":" SSRez Parts Kit w/PCB - Set of 8","Qty":2,"Weight":"0.86"}}}}}', true);
The first section of code returns the below for $ShippingObj. Note the "[collection] => array(5) " that does not expand out...its empty. I have checked the string from the previous JS and it is fine.
array(10) (
[name] => (string) newShipment
[comments] => (string)
[count] => (int) 1
[itemID] => (int) 0
[itemWeight] => (float) 16.2955
[itemLength] => (int) 0
[itemWidth] => (int) 0
[itemHeight] => (int) 0
[limits] => (string)
[collection] => array(1) (
[0] => array(10) (
[name] => (string) CG2000 OEM Box
[comments] => (string)
[count] => (int) 5
[itemID] => (string) 2
[itemWeight] => (float) 8.1475
[itemLength] => (string) 21
[itemWidth] => (string) 16.5
[itemHeight] => (string) 12.5
[limits] => (string) 2ND
[collection] => array(5) (
)
)
)
)

Categories