My function returns a bunch of attribute ids and it's corresponding names in json format. For eg:
{
"DETAILS": [
{
"ATTR_ID": "522",
"ATTRIBUTE_ID": "4222",
"ATTRIBUTE_TYPE": "email",
},
{
"ATTR_ID": "523",
"ATTRIBUTE_ID": "4006",
"ATTRIBUTE_TYPE": "interest",
}
]
}
I need to store it in an array which i need to cache .( I'll be probably using $_SESSION)
Now another function returns me set of attribute ids:
$val_array = $subarray[arrayOfAttributes];
foreach ($val_array as $val)
{
print "Attrib Value: $val
"; //This will print ids 4222,4223,etc
}
what I need to do is correspond the ids with the type from the cache nad print out the respective Types.
I am unable to formulate this logic into code.