<h2>Kode Prodi</h2>
<?php
//echo "Id SP = $id_sp";
$pts="id_sp='$id_sp'";
//echo $gettoken;
$result=$proxy->GetRecordset($gettoken,'sms',$pts,'','','');
$coba=$result['result'];
//var_dump($coba);
?>
      <table id="myTable" class="display table" width="100%" border="0" >
      
      <thead>  
        <tr> 
        <?php
        // untuh membuat judul kolom
        foreach($coba as $key=>$value){
           ?>
          <th bgcolor="#FFA6D2">No</th>
          <?php
           foreach($value as $item=>$final_item){
              ?>
              <th height="20" align="center" bgcolor="#FFA6D2">&nbsp;<?php echo $item; ?>&nbsp;</th>
              <?php
           }
        }
        // akhir judul kolom
        ?> 
        </tr>  
      </thead>  
      <tbody>
      <?php
          // untuk menampilkan data dalam tabel
          $a=0;
          foreach(@$coba as $key=>$value){
              for($i=0;$i<1;$i++){
              $a++;
              if ($a%2==1)
                  $warna="success";
              else
                  $warna="danger";	 
              ?>
              
              <tr class="text" bgcolor=<?php echo $warna; ?>>
              
                    <td class=<?php echo $warna;?>><?php echo $a;?></td>
                    <?php
                    foreach(@$value as $item=>$final_item){
                      ?>
                      
                      <td height="20" align="center" class=<?php echo $warna;?>>&nbsp <?php echo $final_item; ?>&nbsp;</td> 
                      
                      <?php
                    }
              ?>
              </tr>
              <?php
              }	
          }
		  ?>