私の関数は、一連の属性IDとそれに対応する名前をjson形式で返します。例:
{
"DETAILS": [
{
"ATTR_ID": "522",
"ATTRIBUTE_ID": "4222",
"ATTRIBUTE_TYPE": "email",
},
{
"ATTR_ID": "523",
"ATTRIBUTE_ID": "4006",
"ATTRIBUTE_TYPE": "interest",
}
]
}
キャッシュする必要のある配列に格納する必要があります(おそらく$ _SESSIONを使用します)
ここで、別の関数が属性IDのセットを返します。
$val_array = $subarray[arrayOfAttributes];
foreach ($val_array as $val)
{
print "Attrib Value: $val\n"; //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.
このロジックをコードに定式化することができません。