PHP - Problems with JSON encoding
Those are not duplicates, they are due to PDO's FETCH_MODE. By default it fetches both numeric and associative keys.
Use
$stmt->fetch(PDO::FETCH_NUM)
for numeric and
$stmt->fetch(PDO::FETCH_ASSOC)
for associative
Those are not duplicates, they are due to PDO's FETCH_MODE. By default it fetches both numeric and associative keys.
Use
$stmt->fetch(PDO::FETCH_NUM)
for numeric and
$stmt->fetch(PDO::FETCH_ASSOC)
for associative