I'm just stucked with this. How could I read a json file using PHP.
I have file.json with the following data sample
[
{
"lastname": "John",
"firstname": "Michael"
},
{
"lastname": "Nick",
"firstname": "Bright"
},
{
"lastname": "Cruz",
"firstname": "Manny"
}
]
Can you share me a php code how to read file.json and extract it to html table?
<table>
<tr><td>Firstname</td><td>Lastname</td></tr>
</table>
Thank you in advance