variable php fichier html
Bonsoir, dans une boucle foreach je généré des variables qui vienne d'un traitement précédent
Code:
1 2 3 4 5 6 7 8 9
| foreach($sheet->getRowIterator() as $row) {
$lecon = $sheet->getCell("D".$v_index_ligne)->getValue();
$chaine = $sheet->getCell("L".$v_index_ligne)->getValue();
$titre= $sheet->getCell("F".$v_index_ligne)->getValue();
$cour_moodle= $sheet->getCell("L".$v_index_ligne)->getValue();
$ordre_video= $sheet->getCell("E".$v_index_ligne)->getValue();
$codeembeded= $sheet->getCell("BI".$v_index_ligne)->getValue();
} |
je voudrais qu'a chaque passage de boucle soit créer un fichier nommé $chaine.html.
genre : fopen($chaine.".html", "a" );mais le souci c'est que je veut que le contenu soit un contenu déjà existant d'une page que j'ai déja et que les variables y sont transférées
Exemple:
Code:
1 2 3 4 5 6 7 8 9 10
|
<?php echo"<title>$chaine</title>"?>
</head>
<body>
<div id="mbs-video">
<table cellspacing="1" cellpadding="1" border="0" width="930"><tbody>
<tr>
<td width="380" valign="top">
<?php echo"<h1>$lecon</h1>";?> |
Merci de m’aiguiller les amis