Hallo Leute,
schonmal gleich als erstes ich bin ein total Anfänger!
Ich schreibe über php werte in ne txt. So sieht das dann in der txt aus...
	diese Werte werden dann ausgelesen und eine Tabelle wird mit ihnen gefüllt.
	
 Ich möchte, dass die Zeilen in der der eine Wert gleich "nein" ist rot gefärbt werden und die anderen grün.
Wie geht das? bitte helft mir !
Danke im vorraus
euer Thomas
					schonmal gleich als erstes ich bin ein total Anfänger!
Ich schreibe über php werte in ne txt. So sieht das dann in der txt aus...
Code:
	
	aaa ; ja ; aaa ; 05.04.2006 bbb ; nein ; bbb ; 05.04.2006 ccc ; ja ; ccc ; 05.04.2006
PHP-Code:
	
	
<table border=1>   
<tr>    
<th>Nr.</th>    
<th>Name</th>   
 <th>Dabei ?</th>    
<th>Kommentar</th>    
<th>Datum</th>   </tr>  
<meta http-equiv="expires" content="0">;  
<?php   
$datei = "test.txt"; // Name der Datei   
if (file_exists ($datei)){   
$array = file($datei); // Datei in ein Array einlesen   
for ($i = 0; $i < count($array); $i++) {   
 $array[$i] = explode(";" , $array[$i]);    
echo "<tr><th>" . ($i+1) . "</th>"; // Zeilennummer
for ($a = 0; $a < 4; $a++) { // 4 Tabellenspalten      
echo "<td>" . $array[$i][$a] . "</td> \n";     
}    
echo "</tr> \n";    
}   
}else {   
print "FEHLER";
}  
?>  
</table>
Wie geht das? bitte helft mir !
Danke im vorraus
euer Thomas
 
          
 Spalten einfärben
									
									
									Spalten einfärben
								
Kommentar