Untitled
By: a guest | Mar 21st, 2010 | Syntax:
PHP | Size: 1.25 KB | Hits: 64 | Expires: Never
<html>
<head>
<title>Carte</title>
</head>
<body>
<style>
table
{
border-collapse: 3px; collapse;
}
td, th /* Mettre une bordure sur les td ET les th */
{
border: 1px solid black;
text-align: center;
}
</style>
<table>
<?php
for($y = 1; $y <= $y_max; $y++) { ?>
<tr> <?php
for($x = 1; $x <= $x_max; $x++) { ?>
<td>
<?php
$req_perso = "SELECT * FROM perso WHERE idmap='$idmap' AND x='$x' AND y='$y'";
$reponse_perso = mysql_query($req_perso);
while ($donnees_perso = mysql_fetch_array($reponse_perso) ) {
$qui = $donnees_perso['nom'];
{ $qui == "_____"; }
echo $qui; }
while ($donnees_perso = mysql_fetch_array($reponse_perso) ) {
if($donnees_perso['nom'] == NULL) {
$reponse_case = mysql_query("SELECT * FROM map_$idmap WHERE x='$x' AND y='$y'");
while ($donnees_case = mysql_fetch_array($reponse_case) ) { echo '____'; }}}
?>
</td><?php } ?>
</tr>
<?php } ?>
</table>
</body>
</html>