[Solved] PHP and dataset


Your Data:

var data = [{"id": "71002","fullName": "Chenz","title": "Mechanical Engineer","reportTo": "Structural Manager","Reportingday": "2017-01-01T09:00:00.000Z" },

Looks to be JSON. You should look at the json_decode() and json_encode() functions. It will convert JSON to an array and an array to JSON. Once in an array you can easily used that to create web pages.

http://php.net/manual/en/function.json-decode.php

http://php.net/manual/en/function.json-encode.php

<?php $myData = json_decode('data = [{"id": "71002","fullName": "Chenz","title": "Mechanical Engineer","reportTo": "Structural Manager","Reportingday": "2017-01-01T09:00:00.000Z" }');

Would allow you to call the values something like so

echo '<span>'.$myData->data['id'].'</span>';

Would return

<span>71002</span>

You can test and look at the data once in array format with something like

die(print_r($myData));

2

solved PHP and dataset