tableau php html

tableau php html - PHP - Programmation

Marsh Posté le 05-01-2003 à 20:57:22    

voila je veux afficher un tableau dans lequel se range des donnés mai sil ne fonctionne pas pouvez vous jetez un oeil. Merci
 
 
  print("
 
<center>
 <h1>  
Moulinets Etang  
<br> <br>  
<center> <table border="1" cellpadding="2" cellspacing="0" bordercolor="#0000FF">
 <tr width="100">
  <td align="center" width="104"> ".$nom." </td>
  <td align="center" width="104"><img src=".$photo." height=50> </td>
  <td align="center" width="104">".$car." </td>
  <td align="center" width="104">".$peuro." </td>
  <td align="center" width="104">".$pf." </td>
</tr>
 </table>" );
  $i++;
}
?>

Reply

Marsh Posté le 05-01-2003 à 20:57:22   

Reply

Marsh Posté le 05-01-2003 à 21:08:22    

Remplace tes " par des \" (sauf ceux de print), déjà.


---------------
StarCraft Professional Gaming Database | [Ze Topic] Starcraft/BroodWar
Reply

Marsh Posté le 05-01-2003 à 23:27:12    

c'est la meme erreur que sur ton autre topic ...

Reply

Marsh Posté le 06-01-2003 à 04:00:33    

dans ton code html au lieu d'utiliser des " utilise des '....

Reply

Marsh Posté le 06-01-2003 à 07:15:49    

echo  "
 
<center>
<h1>  
Moulinets Etang  
<br> <br>  
<center> <table border=\"1\" cellpadding=\"2\" cellspacing=\"0\" bordercolor=\"#0000FF\">
<tr width=\"100\">
 <td align=\"center\" width=\"104\"> ".$nom." </td>
 <td align=\"center\" width=\"104\"><img src=".$photo." height=\"50\"> </td>
 <td align=\"cente\r" width=\"104\">".$car." </td>
 <td align=\"center\" width=\"104\">".$peuro." </td>
 <td align=\"center\" width=\"104\">".$pf." </td>
</tr>
</table>" );
 $i++;
}
?>

Reply

Marsh Posté le 06-01-2003 à 10:38:45    

tu te prends un peu la tête à ouvrir un print avec " et à mettre \ partout ailleurs.
 
comme ça, c'est beaucoup + simple et si tu as la coloration syntaxique sur ton editeur ça differencie les variable des chaines :
print '<td width="100">'.$var.'</td>';
 
print ''; --> affichage sans interpretation (print '$var'; va afficher $var)
print ""; --> affichage avec interpretation (print "$var"; va afficher la valeur de var)


Message édité par Schimz le 06-01-2003 à 10:39:17
Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed