I have results from a database that are returned as json encoded, I haven't got much experience in it so not too sure what's going here, however I have tried concatenating values to see if it works but it doesn't and it gets returned as is, i.e. markup.
while($row = $stmt->fetch()) {
$return_arr[] = '<a href="'.$row['slug'].'">'.$row['title'].'</a>';
}
echo json_encode($return_arr);
which results in:
<a href="link">title</a>
How can I return a hyperlink? I've also tried escaping the quotes.