<?php
$bibliographicDataHTML = '<div class="container mt-4">
			      <h4>Bibliografische Daten</h4>
                              <table class="table table-striped table-bordered" >
                                  <thead style="background-color:#14416b;">
                                      <tr>
                                          <th style="width: 20%;"><h5>Feldbezeichnung</h5></th>
                                          <th style="width: 80%;"><h5>Inhalt</h5></th>
                                      </tr>
                                 </thead>
                                 <tbody>
';


foreach ($bibliographicArray as $content)  {
	switch ($content['fieldId'])  {
	    case 'titleinput1': $bibliographicDataHTML .= '   <tr>
                    						      <td>Titel</td>
                    						      <td> ' .$content['fieldValue'] .'</td>
							       </tr>';
							       break; 
	    case 'authorinput1': $i=1; 
	    case 'authorinput2': $i=2;
	    case 'authorinput3': $i=3;
	    case 'authorinput4': $i=4;
	    case 'authorinput5': $i=5;
	    case 'authorinput6': $i=6;
	    case 'authorinput7': $i=7;
	    case 'authorinput8': $i=8;
	    case 'authorinput9': $i=9;   
		    		 if (strlen($content['fieldValue'])) {
		    			$bibliographicDataHTML .= '   <tr>
                                                                          <td>Autor/-in ${i}</td>
                                                                          <td> ' .$content['fieldValue'] .'</td>
                                                                      </tr>';     
				    }
		    		break; 
	    case 'publicationyearinput1': $bibliographicDataHTML .= ' <tr>
                                         			          <td>Jahr</td>
                                                                          <td> ' .$content['fieldValue'] .'</td>
                                                                      </tr>';
                                        break;
	    case 'abstractinput1': $i=1; 	
	    case 'abstractinput2': $i=2;
	    case 'abstractinput3': $i=3;
	   				 if (strlen($content['fieldValue'])) {
		    			 $bibliographicDataHTML .= '  <tr>
                                                                         <td>Abstract ${i}</td>
                                                                         <td> ' .$content['fieldValue'] .'</td>
					                             </tr>';
					}
                                  break;
	    default: 		  $bibliographicDataHTML .= '  <tr>
                                                                         <td>Unbekannt</td>
                                                                         <td> ' .$content['fieldValue'] .'</td>
                                        }                             </tr>';
	}
}

$bibliographicDataHTML .= '	</tbody>
        		     </table>
    			   </div>'; 

