[PHP] Exceltabelle, background gelbfärben

Dieses Thema im Forum "Webentwicklung" wurde erstellt von Sonderk!nd, 25. Mai 2011 .

Status des Themas:
Es sind keine weiteren Antworten möglich.
  1. 25. Mai 2011
    Exceltabelle, background gelbfärben

    Hihi,

    ich erstelle über ein Script, eine Exceltabelle, was auch alles wunderbar funktioniert...

    PHP:
        <? 
    echo  "<table border = '1'>" ;
        
    ?>
        <tr><th>Von</th><th>Bis</th><th>KW</th><th>Name</th><th>Vorname</th><th>Gruppe</th><th>Aufgabe</th><th>Rufnummer</th><th>Mo</th><th>Di</th><th>Di</th><th>Mi</th><th>Mi</th><th>Do</th><th>Do</th><th>Fr</th><th>Fr</th>
        <?
        
    for( $i  0 $i  30 ; $i ++){
            
    $zeitstring  "+" . $i . " week" ;
            
    $berechnen  strtotime ( $zeitstring );
            
    $zeitstring2  "+  { $i }  week 6 days" ;
            
    $berechnen2  strtotime ( $zeitstring2 );
            if(
    $woche  count ( $row )- 2 )
                
    $woche  0 ;
            if((
    date ( "W" ) +  $i )> 52 )
                
    $week  1 ;
            else
                
    $week  = ( date ( "W" ) +  $i );
            echo 
    "<tr>" ;
            echo 
    "<td>"  date ( 'd.m.Y' $berechnen ) .  "</td><td>"  date ( 'd.m.Y' $berechnen2 ) .  "</td><td>" . $vonWeek . "</td>" ;
            for(
    $a  0 $a  < count ( $row )- 1 ; $a ++)
                if(
    $woche  ==  $row [ $a ][ 'intWechsel' ]){
                    echo 
    "<td>" . $row [ $a ][ 'chrName' ]. "</td><td>" . $row [ $a ][ 'chrVorname' ]. "</td><td>" . $row [ $a ][ 'chrGruppe' ]. "</td><td>" . $row [ $a ][ 'chrAufgabe' ]. "</td> <td>" . $row [ $a ][ 'chrRufnummer' ]. "</td><td>16:00</td><td>8:00</td><td>16:00</td><td>8:00</td><td>16:00</td><td>8:00</td><td>16:00</td><td>8:00</td><td>16:00</td>" ;
                }
            echo 
    "</tr>" ;
            
    $woche ++;
            
    $vonWeek ++;
            if(
    $vonWeek > 51 )
                
    $vonYear ++;
        }
        echo 
    "</table>" ;
    funktioniert auch super, nur das ich den Background net Gelb kriege von den THs...
    Wenn ichs als HTML ausgebe funktionierts, da ich über die CSS angegeben habe, das alle TH gelb werden sollen, die sind aber nur im HTML gelb net in der Exceldatei... -.-^^

    edit: ach verdammt alles verschoben, naja geht auch nur um ne idee, Quellcode sollte nebensächlich sein ^^
     
  2. 25. Mai 2011
    AW: Exceltabelle, background gelbfärben

    HTML:
    <th bgcolor="#FFFF00">
    
     
  3. 25. Mai 2011
    AW: Exceltabelle, background gelbfärben

    danke habs per Style versucht das ging net, auf die altmodische bgcolor idee bin ich net gekommen xD
     
  4. Video Script

    Videos zum Themenbereich

    * gefundene Videos auf YouTube, anhand der Überschrift.