MagicBuzz | je connais pas la syntaxe de replace en PHP, mais on va dire que c'est comme le VB (sinon, adapte )
Code :
- <?php
- if (isset($articles)) {
- foreach($articles as $article) {
- /*$id = $article["id"];
- $nom = $article["nom"];
- $description = $article["description"];
- $tarif = $article["tarif"];*/
- printf("<tr><td>%d</td><td>%s</td><td>%s</td><td>%d</td></tr>",
- replace(replace($article["id"], "<", "<" ), ">", "$gt;" ),
- replace(replace($article["nom"], "<", "<" ), ">", "$gt;" ),
- replace(replace($article["description"], "<", "<" ), ">", "$gt;" ),
- replace(replace($article["tarif"], "<", "<" ), ">", "$gt;" ));
- /* echo "<tr>";
- echo "<td>"; $id; echo "</td>";
- echo "<td>"; $nom; echo "</td>";
- echo "<td>"; $description; echo "</td>";
- echo "<td>"; $tarif; echo "</td>";
- echo "</tr>"; */
- }
- }
- ?>
|
|