Skip to main content
se añadieron 179 caracteres en el cuerpo
Origen Enlace
alanfcm
  • 20.9k
  • 11
  • 19
  • 35

Puedo ayudarte con el fondo amarillo:

while  ($data = sqlsrv_fetch_array($result,SQLSRV_FETCH_ASSOC)) {
      if ($i == 0) {
        $counter = 0;
        foreach($data as $key => $value) {                
          $tabla .="<th scope='col' style='text-align: center;background-color: #054AC4;color: #fff'>" . $key . "</th>";
          $counter++;
          if ($counter % 3 == 0) {
            $tabla .= "<th style='background: black'>  </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>";

        }            
        $tabla .="<td>".$value."</td>";            
      }
      $tabla .="</tr>";
      $i++;
   }

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>";

        }            
        $tabla .="<td>".$value."</td>";            
      }
      $tabla .="</tr>";
      $i++;
   }

Puedo ayudarte con el fondo amarillo:

while  ($data = sqlsrv_fetch_array($result,SQLSRV_FETCH_ASSOC)) {
      if ($i == 0) {
        $counter = 0;
        foreach($data as $key => $value) {                
          $tabla .="<th scope='col' style='text-align: center;background-color: #054AC4;color: #fff'>" . $key . "</th>";
          $counter++;
          if ($counter % 3 == 0) {
            $tabla .= "<th style='background: black'>  </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>";

        }            
        $tabla .="<td>".$value."</td>";            
      }
      $tabla .="</tr>";
      $i++;
   }
se eliminaron 49 caracteres en el cuerpo
Origen Enlace
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++;
   }

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++;
   }

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>";

        }            
        $tabla .="<td>".$value."</td>";            
      }
      $tabla .="</tr>";
      $i++;
   }
Origen Enlace
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++;
   }