Bonjour,
voila je voulais afficher les nouveaute des produits, mais cela ne fonctionne pas pour les illustrations l'echo dans la 2 boucle
(foreach( $tab as $IdIllustrations))
ne renvoi rien alors qu'elle rentre bien dans
if ( ($tab = $IdIllustrations) !== null )
:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| /*appelle de la class produit*/
$objet=new produit;
/*utilisation fonction pour afficher nouveautés*/
$Nouveautes=$objet->afficherLesNouveautes();
if ( ($tab = $Nouveautes) !== null ) {
$body.='<div class="Nouveaute_center">';
foreach( $tab as $Nouveautes ) {
/*utilisation fonction pour recuperer valeur categorie*/
$IdCateg=$Nouveautes->getId();
/*construction url dynamique*/
$body.='<ul><li><a>';
$body.=''.$Nouveautes->getNom().'';
$IdIllustrations=$Nouveautes->getIllustrations();
$body.='</a></li></ul>';
}
}
if ( ($tab = $IdIllustrations) !== null ) {
foreach( $tab as $IdIllustrations) {
/*utilisation fonction pour recuperer valeur categorie*/
echo $Fichier=$IdIllustrations->getFichier();
}
}
$body.='</div>'; |
merci de votre aide.
en faite j 'ai la table illustration:
id - description - fichier
table produit:
id - nom - description - .... - id-illustration
Partager