Skip to main content
1 de 3
alanfcm
  • 20.9k
  • 11
  • 19
  • 35

Puedo ayudarte con el fondo amarillo:

while  ($data = sqlsrv_fetch_array($result,SQLSRV_FETCH_ASSOC)) {
      if ($i == 0) {
        foreach($data as $key => $value) {                
          $tabla .="<th scope='col' style='text-align: center;background-color: #054AC4;color: #fff'>" . $key . "</th>";
        }
        $tabla .="</tr>";
        $tabla .="</thead>";

        $tabla .="<tbody>";
      } 
      
      foreach($data as $key => $value) {  

        if($value=="ZONA I - ADONIAS SILVA"  or $value=="ZONA II - DANNY CANELA" or $value=="ZONA III - SANDRO CHAVEZ")
        {
            $tabla .= "<tr style='background: yellow'>";
            
        }             
        elseif($key == 'agencia') {
        {         
           $tabla .="<tr>";

        }
        $counter++;
        $tabla .="<td>".$value."</td>";
        
      }
      $tabla .="</tr>";
      $i++;
   }
alanfcm
  • 20.9k
  • 11
  • 19
  • 35