I have this code:
$url='MY API';
$json = json_decode( file_get_contents( $url ) );
$res=$json->results;
foreach( $res as $obj ){
$values=$obj->values;
foreach( $values as $o ){
echo $o->name . ' ' . $o->value . ' ' . $o->objectTypeId . '<br />';
}
}
Getting this output:
country Germany 0-2
title_no_dropdown ADP, ECM Intro 0-1
presented_by PMI Document Solutions, Inc. 0-1
city Munich 0-1
website http://www.pmi-ny.com 0-1
start_date October 24 0-1
time 1200 0-1
type Webinar 0-1
description this is a test 0-2
email bob@hotmail.com 0-1
link Link to partner event 0-1
country United States 0-2
title_no_dropdown ADP, Work Smart from the Start 0-1
state NY 0-1
presented_by PMI Document Solutions, Inc. 0-1
city Corning 0-1
website http://www.pmi-ny.com 0-1
start_date September 24 0-1
time 1000 0-1
type Infoseminar 0-1
description This is a test 0-2
email likwid2@hotmail.com 0-1
How can I get the $o->value as a variable or some way to be able to control the order so I can add them to table cells. Also, how can I create that table with those variable. Thanks.