So I have the overall basic table structure I just am unsure how I can loop through the entire array to print out each object into a table, rather than just the first 3 objects within the collection as you see here, any help is greatly appreciated:
<?php
// Create a new cURL resource
$ch = curl_init();
// Define the URL, Authentication Type and Credentials
curl_setopt($ch, CURLOPT_URL, '<URI>');
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_NTLM);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERPWD, '<Username>:<Password>');
$response = curl_exec($ch);
$array = json_decode($response);
?>
<html>
<head>
<title></title>
<style type="text/css">
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
th, td {
padding: 5px;
text-align: left;
}
table#t01 {
width: 100%;
background-color: #f1f1c1;
} </style>
</head>
<body>
<table id="t01">
<tbody>
<tr>
<th>Name</th>
<th>Final Status</th>
<th>Username</th>
</tr>
<tr>
<td><?php echo $array[0]->{'jobName'}; ?></td>
<td><?php echo $array[0]->{'finalStatus'}; ?></td>
<td><?php echo $array[0]->{'userName'}; ?></td>
</tr>
<tr>
<td><?php echo $array[1]->{'jobName'}; ?></td>
<td><?php echo $array[1]->{'finalStatus'}; ?></td>
<td><?php echo $array[1]->{'userName'}; ?></td>
</tr>
<tr>
<td><?php echo $array[2]->{'jobName'}; ?></td>
<td><?php echo $array[2]->{'finalStatus'}; ?></td>
<td><?php echo $array[2]->{'userName'}; ?></td>
</tr>
</tbody>
</table>
<p>
</p>
</body>
</html>
<?php
curl_close($ch);
?>