voici mon code, j'ai un probleme je ne comprends pas pour quoi ma variable $transforme apparait avec un hypertext ?
Au premier passage du foreach cela est bon: le mot "Sapeurs-pompiers" est correct , mais par la suite les mots "Sapeurs-pompiers communaux" et "Sécurité civile" prennent un hypertext alors que je ne le demande pas .
avez vous une idée
cordialement
Code : Tout sélectionner
foreach ($result as $key2 => $value) { // scan tous les mot clé principaux
$transforme = iconv("ISO-8859-1//IGNORE", "UTF-8", $value);
echo "<p><b><h3>$transforme</h3></b></p>";
echo "<ul>";
foreach ($total[$value] as $total2 => $value2) {
$variable_NA = $total[$value][$total2];
$lien = $numero_article[$variable_NA];
$variable_MS = $mot_cle_secondaire[$variable_NA];
$variable_MS2 = iconv("ISO-8859-1//IGNORE", "UTF-8", $variable_MS);
echo "<ol><a href='http://www.mozilla.com/$lien'" . ">" . $variable_MS2 . "</ol>";
echo "<br>";
}
echo "</ul>";
}Resultat
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Titre de la page</title>
<!-- Le reste du contenu
<link rel="stylesheet" href="style.css">
<script src="script.js"></script> -->
</head>
<p><b><h3>Sapeurs-pompiers</h3></b></p><ul><ol><a href='http://www.mozilla.com/75'>Aéronefs</ol><br><ol><a href='http://www.mozilla.com/75'>Lutte contre l'incendie</ol><br></ul><p><b><h3>Sapeurs-pompiers communaux</h3></b></p><ul><ol><a href='http://www.mozilla.com/76'>houla</ol><br></ul><p><b><h3>Sécurité civile</h3></b></p><ul><ol><a href='http://www.mozilla.com/80'>volontariat civil</ol><br><ol><a href='http://www.mozilla.com/80'>volontariat international
</ol><br><ol><a href='http://www.mozilla.com/81'>testTOTO</ol><br></ul>