dans un précedent post j'avais une ligne de code pour afficher une photo :
Code : Tout sélectionner
<img src = "../image/<?php echo $inTitre.".jpg";?>" width="150" height="150" />maintenant je veux utiliser un fetch pour afficher les photos de la bdd :
Code : Tout sélectionner
<img src = "../image/<?php
// On se connecte à la Bdd
include('../page/connection.php');
//echo $inTitre.".jpg";
$sth = $bdd->prepare('SELECT titre FROM entree_personnel');
$sth->execute(array('titre' => $inTitre));
$result = $sth->fetch(PDO::FETCH_ASSOC);
echo $result.".jpg";
?>" width="150" height="150" />Notice: Array to string conversion in C:\UwAmp\www\essai\page\principal.php on line 145 Call Stack #TimeMemoryFunctionLocation 10.0010144368{main}( )...\principal.php:0 Array.jpg" width="150" height="150" />