<div class="col-md-9"> <div class="thumbnail"> <?php include 'requete_appart.php'; include 'connexion.php'; $loyer = get_loyer($conn, $_GET['id']); $req = get_appart($_GET['id']); $result = odbc_exec($conn, $req); while (odbc_fetch_row($result)) { $id = odbc_result($result, 1); $photo = odbc_result($result, 2); $type = odbc_result($result, 3); $idtype = odbc_result($result, 4); $titre = get_description_titre($conn, $_GET['id']); $description = get_description_total($conn, $_GET['id']); } echo ' <img class="img-responsive" src="' . $photo . '" alt=""> <div class="caption-full"> <h4 class="pull-right">' . $loyer . ' €</h4> <h4><a href="#">' . $titre . '</a> </h4> <p>' . utf8_encode($description) . '</p> <h3>' . $type . '</h3> </div> '; ?> </div> <div class="well">
while(odbc_fetch_row($result)){ $name = odbc_result($result, 1); $surname = odbc_result($result, 2); print_r("$name $surname\n"); } odbc_close($conn);/* */ include 'requete_appart.php'; $req = find_appart(0); $result = odbc_exec($conn, $req); while (odbc_fetch_row($result)) { $id = odbc_result($result, 1); $photo = odbc_result($result, 2); $titre = get_description_titre($conn, $id); $description = get_description_total($conn, $id); imprimer($id, $titre, $photo, $description); } odbc_close($conn); function imprimer($id, $titre, $photo, $description) { echo ' <div class="col-md-3 col-sm-6 hero-feature"> <div class="thumbnail"> <img src="' . $photo . '" alt=""> <div class="caption"> <h3>' . utf8_decode($titre) . '</h3> <p> <a href="appartement.php?id=' . $id . '" class="btn btn-primary">Voir Infos</a> <a href="#"</a> </p> </div>