I have a string like following...
Array ([product_name] => this is a product [product_desc] => some descripyion [cat_id] => 3)
This is looking like as an array but this is a string. If I use echo then it prints the same result.
$someVariable = "Array ([product_name] => this is a product [product_desc] => some descripyion [cat_id] => 3)";
echo $someVariable;
Result:
Array ([product_name] => this is a product [product_desc] => some descripyion [cat_id] => 3)
I need it to convert to an array so that I can do the following..
echo $someVariable['product_name'];
and get the following result
this is a product
Is there any way to do this ?
Thanks