I am making a table which will fetch data from API. I am able to fetch the first value, How can i use foreach with my code? I am not able to do so.
My Table:
<table class="table table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Steam URL</th>
</tr>
</thead>
<tbody>
<tr>
<th><?php echo $name;?></th>
<th><?php echo $steam;?></th>
</tr>
</tbody>
</table>
And My PHP Code:
$name = $json->submissions[0]->data->name;
$steam = $json->submissions[0]->data->steam;
It's showing first value correct but not able to get the second entry.
foreach()in your code