I have the following function in a PHP script, which returns and API call:
if (in_array((int)$result['code'], array(200, 201))) {
$presult=(json_decode($result['body'],true));
print_r($presult);
} else {
print("error parsing result");
var_dump($result);
}
$presult displays raw data in the following format:
Array
(
[contacts] => Array
(
[users] => Array
(
[0] => Array
(
[first_name] => Peter
[last_name] => Parker
I want to print this array in an HTML table with columns serial no., First name, Last