Durée du remboursement: <input type="text" name="duree"><br>
		Montant à emprunter: <input type="text" name="mont"><br>
		Taux d'intérêt annuel en pourcentage: <input type="text" name="tx"><br>
		<input type="submit" value="Calculer">
	</form>

	<?php 
if (isset($_GET['duree']) && isset($_GET['mont']) && isset($_GET['tx'])) {
    $duree = $_GET['duree'];
    $montant = $_GET['mont'];
    $taux = $_GET['tx'];
    // affiche le tableau des données
    $head = array("Mois", "Reste", "Interets", "Interet cumulés", "aPayer");
    //entete du tableau
    $rembMens = remboursementEmprunt($montant, $taux, $duree);
    afficherTableau($rembMens, $head);
    // affichage du tableau
    // créé le graphe du remboursement de l'emprunt
    $restAPayer = $rembMens;
    // tableau des données sans les titres des colonnes
    $restAPayerV = array();
    // tableau des données verticles
    foreach ($restAPayer as $row) {
        $restAPayerV[] = $row["reste"];
    }
    $restAPayerH = array();
    // tableau des données horizontals
    foreach ($restAPayer as $row) {
        $restAPayerH[] = $row["mois"];
    }
    createGraphe($restAPayerV, $restAPayerH, "Reste a payer par mois", "Reste (€)", "Mois");
Exemple #2
0
include "begin.php";
?>

<h1 class='middle'>Planning des matchs</h1>
<table>
	<col>
	<col>
	<col>
	<col>
	<col>
	<col>
	<col>
	<tr>
		<th>Lundi</th>
		<th>Mardi</th>
		<th>Mercredi</th>
		<th>Jeudi</th>
		<th>Vendredi</th>
		<th>Samedi</th>
		<th>Dimanche</th>
	</tr>
	
	<?php 
echo afficherTableau();
?>

</table>
</h1>

<?php 
include "end.php";