Hi,
I wonder if anyone can help? I'd like to know if I can write some code that can process a string like
"PRODUCT😛RODUCTDATA:NAME:Chess for beginners"
into an array with the structure
$item['PRODUCT']['PRODUCTDATA']['NAME'] = "Chess for beginners"
I should like my program to be able to build up an array $item[] from several such strings. However, the strings dictate the structure of the array. Each string may have a different number of intended 'elements' (eg [PRODUCT][PRODUCTDATA]) preceding the intended content (eg. 'Chess for beginners'). Examples:
"PRODUCT:CODE:57"
"PRODUCT😛RODUCTDATA:NAME:Chess for beginners"
"PRODUCT😛RODUCTDATA😛RICE:£4.99"
"PRODUCT😛RODUCTICON:http://www.mysite.com/chess.gif"
Can anyone think of a simple piece of code that I could feed the strings into which would build up the array $item[]?
Thanks!