} } ?> </table> <br /> <h2>Email List</h2> <table class="clearfix"> <form method="post" name="form5" action=""> <fieldset> <input name="emails" type="submit" class="getdate" value="Get Emails" /> </fieldset> </form> <?php if (isset($_POST['emails'])) { $api = new roboSISAPI(); $arr_emails = $api->getAllEmails(); $arr_emails = json_decode($arr_emails); $numemails = count($arr_emails); echo "<p>There are {$numemails} emails currently in the database.</p>"; for ($i = 0; $i < $numemails; $i++) { $cl = ""; //if ($i % 2 == 0) // allows table to alternate colors //{ // $cl = "r1"; //} //else //{ // $cl = "r2"; //} echo "<tr class=\"" . $cl . "\"><td>" . $arr_emails[$i] . ",</td></tr>"; }