i want to unserialize? and display Array from my text field in db table.
This is what i use to serialize on Insert statement.
$persons = serialize(array($paymentData['anArray']));
and this returns after var_dump
["persons"]=> string(104) "a:1:{i:0;a:2:{i:0;a:1:{s:5:"value";s:15:"Producer: Simon";}i:1;a:1:{s:5:"value";s:13:"Writer: Simon";}}}"
Now the object that i return from Select statement is memberDetails
$sql = "SELECT *
FROM memberDetails M WHERE M.id=:id";
$db = getDB();
$stmt = $db->prepare($sql);
$stmt->bindParam("id", $id, PDO::PARAM_INT);
$stmt->execute();
$memberDetails = $stmt->fetch(PDO::FETCH_OBJ);
var_dump ($memberDetails); exit;
$response['success'] = true;
$response['memberDetails'] = $memberDetails;
echo json_encode($response);
So i want to return two values and display them: like this
Writer: Simon and Producer:Simon
Any help?