How do I use for each to access and print the participant name. The Json object is \"particpants:name\" and it gets populated when uploaded with a tokenized file. I know the tok
1) $json is a string you need to decode it first.
$json = json_decode($json);
2) you need to loop through the object and get its members
foreach($json as $obj){
echo $obj->name;
.....
}
You are supplying the wrong index in this code
foreach($this->jsonObj->{'participants'} as $index => $value)
{
// $this->html.='<td>' . $this->jsonObj->participants[$value].'</td> ';
// instead
$this->html.='<td>' . $this->jsonObj->participants[$index].'</td> ';
//or
//$this->html.='<td>' . $value.'</td> ';
} // foreach