I have a string which look like:
["DZ_Backpack_EP1",[["M4A1"],["M16A2]],[["ItemWaterbottle","FoodSteakCooked","ItemPainkiller","ItemSodaPepsi","ItemBloodbag","ItemMorphine","ItemEpinephrine","ItemBandage"],[1,2,1,1,1,1,1,1]]]
Ant i need to get this array:
DZ_Backpack_EP1 = array(
['weapons'] => array (
[0] => 'M4A1',
[1] => 'M16A2'
),
['items'] => array (
['ItemsList'] => array (
[0] = > 'ItemWaterbottle',
[1] = > 'FoodSteakCooked',
[2] = > 'ItemPainkiller',
[3] = > 'ItemSodaPepsi',
[4] = > 'ItemBloodbag',
[5] = > 'ItemMorphine',
[6] = > 'ItemEpinephrine',
[7] = > 'ItemBandage'),
['ItemsCount'] => array (
[0] = > 'ItemWaterbottle',
[1] = > 'FoodSteakCooked',
[2] = > 'ItemPainkiller',
[3] = > 'ItemSodaPepsi',
[4] = > 'ItemBloodbag',
[5] = > 'ItemMorphine',
[6] = > 'ItemEpinephrine',
[7] = > 'ItemBandage'
)
)
)
i try to edit this example PHP - string to multidimensional array but with no luck. Any ideas?