use JSON_ENCODE
first before saving the array to DB ,then use JSON_DECODE
if you want to get again the contents
$arr = array(
"item_number1" => "1",
"payment_date" => "04:21:34 Dec 06, 2014 PST",
"payment_status" => "Completed",
"first_name" => "sdfsd",
"last_name" => "parsdfsdandekar",
"quantity1" => "1"
);
echo json_encode($arr);
Result after JSON_ENCODE
(Array to JSON String):
{ "item_number1" => "1", "payment_date" => "04:21:34 Dec 06, 2014 PST", "payment_status" => "Completed", "first_name" => "sdfsd", "last_name" => "parsdfsdandekar", "quantity1" => "1" }
0
solved i have stored array in database as a string how can retrieve that array?