I got an array containing results from a SELECT statement. The weird thing is that I can print the array using:
echo json_encode($results);
I got :
[
{
"Habitacions": "3",
"Tipus": "Piso",
"Localitat": "El Vendrell",
"Metres": "2",
"Preu": "300",
"Embarg": "0",
"Operacio": "Lloguer",
"Imatge1": "3_1.jpg",
"Imatge2": "3_2.jpg",
"Imatge3": "3_3.jpg",
"Imatge4": "3_4.jpg",
"Banys": "2",
"Idelement": "3",
"Tipus_EN": "Flat",
"Tipus_CAT": "Pis",
"Imatge1_Big": "3_1B.jpg",
"Imatge2_Big": "3_2B.jpg",
"Imatge3_Big": "3_3B.jpg",
"Imatge4_Big": "3_4B.jpg",
"Descripcio": "Test es",
"ref": "3",
"Obra": "0",
"Descripcio_CAT": "Test cat",
"Descripcio_EN": "Test en"
}
]
But if I try this, I don't get anything echoed:
<?php echo $results['Descripcio_CAT']?>
Same for the rest of the keys.
var_dump($results)output?