As title, i use php PDO connection how to unserialize row['node_relation']
row when i use fetchAll(PDO::FETCH_ASSOC)
Here's the data in DB:
arrow_sn | x1 | x2 | y1 | y2 | node_relation
830 | 365| 334| 545| 389| s:11:"1-A-1,2-A-2";
Here's the code:
$nodesData = $dbh->prepare("SELECT * FROM map_node");
$nodesData->execute();
$row = $nodesData -> fetchAll(PDO::FETCH_ASSOC);
echo json_encode($row);