I keep product options as string in DB, and I need to parse it (string to array).
String is:
{option_name:option_id{variant_id:variant_name}}
How can I parse it with using PHP?
I keep product options as string in DB, and I need to parse it (string to array).
String is:
{option_name:option_id{variant_id:variant_name}}
How can I parse it with using PHP?
serialize($myproductarray). That turns it into a portable string. When you need the info from the database, get the string, and unserialize($myproductstring) to get it back into an array.