1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| if($flux = simplexml_load_file($flux))
{
$donnee = $flux->channel;
foreach($donnee->item as $valeur)
{
$i++;
$sortie[$i] = '<li>';
$sortie[$i] .= '<a target="_parent" href="'.$valeur->link.'">';
$image_produit = str_replace('<img src', '<img width="150px" height="100px" src', $valeur->description);
$sortie[$i] .= $image_produit;
$nom_produit = explode(" - ", $valeur->title);
$sortie[$i] .= '<p class="nf">'.$nom_produit[0].'</p>';
$sortie[$i] .= '<p><span class="add">J\'Achete!</span></p></a>';
$sortie[$i] .= '</li>';
}
}
shuffle($sortie);
foreach($sortie as $key => $value) {
echo $value;
} |
Partager