Diferència entre revisions de la pàgina «Solucio escacs php»
De wikiserver
(Es crea la pàgina amb «<source lang="php"> <!DOCTYPE html> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> …».) |
|||
| Línia 1: | Línia 1: | ||
<source lang="php"> | <source lang="php"> | ||
| − | <!DOCTYPE html> | + | |
| − | + | <!DOCTYPE html> | |
| − | + | <html> | |
| − | + | <head> | |
| − | + | <title>ESCACS</title> | |
| − | + | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| − | + | </head> | |
| − | + | <body> | |
| − | + | <h3> TABLERO DE AJEDREZ DINÁMICO </h3> | |
| − | + | <table width="270px" cellspacing="0px" cellpadding="0px" border="1"> | |
| − | + | <?php | |
| − | + | for($x=0; $x<9;$x++){ | |
| − | + | echo "<tr>"; | |
| − | + | for($i=0; $i<9;$i++){ | |
| − | + | ||
| − | + | if(($x+$i)%2){ | |
| − | + | echo "<td height='30px' width='30px' bgcolor='black'></td>"; | |
| − | + | } | |
| − | + | else{ | |
| − | + | echo "<td height='30px' width='30px' bgcolor='white'></td>"; | |
| − | + | } | |
| − | + | } | |
| − | + | echo "</tr>"; | |
| − | + | } | |
| − | + | ||
| − | + | ?> | |
| − | + | </table> | |
| − | + | </body> | |
| − | + | </html> | |
| − | |||
| − | |||
| − | |||
| − | </html> | ||
<source> | <source> | ||
Revisió del 14:45, 17 oct 2014
<source lang="php">
<!DOCTYPE html> <html>
<head>
<title>ESCACS</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
TABLERO DE AJEDREZ DINÁMICO
| "; | "; |
</body>
</html> <source>