Wall posté le Vendredi 13 avril 2007


Script servant a afficher quelques couleurs


  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//FR" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2.  
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
  6. <meta name="author" lang="fr" content="couleurs"/>
  7.  
  8. <meta name="keywords" content="" />
  9.  
  10. <title>Couleurs</title>
  11.  
  12. </head>
  13.           
  14. <body>
  15.  
  16. <?php
  17.  
  18. $tableau = array() ; 
  19.  
  20.    for($i = 'A' ; $i <= 'F' ; $i++){ 
  21.    
  22.       for($j = 'A' ; $j <= 'F' ; $j++){ 
  23.       
  24.          for($k = 'A' ; $k <= 'F' ; $k++){ 
  25.  
  26.             $tableau[] = $i.$j.$k ; 
  27.             
  28.          } 
  29.       
  30.       } 
  31.       
  32.    } 
  33.  
  34.    for($i = 1 ; $i <= 9 ; $i++){ 
  35.    
  36.       for($j = 'A' ; $j <= 'F' ; $j++){ 
  37.       
  38.          for($k = 'A' ; $k <= 'F' ; $k++){ 
  39.  
  40.             $tableau[] = $i.$j.$k ; 
  41.             
  42.          } 
  43.       
  44.       } 
  45.       
  46.    } 
  47.    
  48.    for($i = 'A' ; $i <= 'F' ; $i++){ 
  49.    
  50.       for($j = 1 ; $j <= 9; $j++){ 
  51.       
  52.          for($k = 'A' ; $k <= 'F' ; $k++){ 
  53.  
  54.             $tableau[] = $i.$j.$k ; 
  55.             
  56.          } 
  57.       
  58.       } 
  59.       
  60.    } 
  61.    
  62.    for($i = 'A' ; $i <= 'F' ; $i++){ 
  63.    
  64.       for($j = 'A' ; $j <= 'F' ; $j++){ 
  65.       
  66.          for($k = 1 ; $k <= 9 ; $k++){ 
  67.  
  68.             $tableau[] = $i.$j.$k ; 
  69.             
  70.          } 
  71.       
  72.       } 
  73.       
  74.    } 
  75.    
  76.    for($i = 1 ; $i <= 9 ; $i++){ 
  77.    
  78.       for($j = 1 ; $j <= 9 ; $j++){ 
  79.       
  80.          for($k = 1 ; $k <= 9 ; $k++){ 
  81.  
  82.             $tableau[] = $i.$j.$k ; 
  83.             
  84.          } 
  85.       
  86.       } 
  87.       
  88.    } 
  89.    
  90.    for($i = 'A' ; $i <= 'F' ; $i++){ 
  91.    
  92.       for($j = 1 ; $j <= 9 ; $j++){ 
  93.       
  94.          for($k = 1 ; $k <= 9 ; $k++){ 
  95.  
  96.             $tableau[] = $i.$j.$k ; 
  97.             
  98.          } 
  99.       
  100.       } 
  101.       
  102.    } 
  103.    
  104.    for($i = 1 ; $i <= 9 ; $i++){ 
  105.    
  106.       for($j = 'A' ; $j <= 'F' ; $j++){ 
  107.       
  108.          for($k = 1 ; $k <= 9 ; $k++){ 
  109.  
  110.             $tableau[] = $i.$j.$k ; 
  111.             
  112.          } 
  113.       
  114.       } 
  115.       
  116.    } 
  117.    
  118.    for($i = 1 ; $i <= 9 ; $i++){ 
  119.    
  120.       for($j = 1 ; $j <= 9 ; $j++){ 
  121.       
  122.          for($k = 'A' ; $k <= 'F' ; $k++){ 
  123.  
  124.             $tableau[] = $i.$j.$k ; 
  125.             
  126.          } 
  127.       
  128.       } 
  129.       
  130.    } 
  131.    
  132.    asort($tableau) ; 
  133.    
  134.    $nb_coul = count($tableau) ; 
  135.    
  136.    $nbcol=20; 
  137.    echo'<table>' ; 
  138.             
  139.       if ($nb_coul != 0) 
  140.             
  141.          for ($i=0; $i<$nb_coul; $i++){ 
  142.                
  143.             if($i%$nbcol==0) 
  144.  
  145.                echo '<tr>'; 
  146.                   
  147.                echo '<td colspan="1" class="center" style="background-color: #'.$tableau[$i].' ; text-align: center ;">#'.$tableau[$i].'</td>' ; 
  148.                   
  149.                   
  150.             if($i%$nbcol==($nbcol-1) or $i==($nb_coul-1)) 
  151.  
  152.                echo '</tr>';            
  153.          }//Fin for 
  154.             
  155.          //Fermeture du tableau 
  156.          echo'</table>' ;  
  157. ?>
  158. </body>
  159. </html> 

Remonter Remonter
L'éditeur javascript - CSS - Gentoo - Tutoriaux PHP - Tutoriels PHP - Php - Breizh Blog