Come mettere il target _blank in un parser xml in php?

Antonino Vento

Nuovo Utente
21 Apr 2016
1
0
0
Ciao,
uso questo codice per estrapolare dei dati di prodotto da un file xml, vorrei che quando l'utente clicca piuttosto che uscire dal mio sito vada in un'altra pagina del browser: chi mi può aiutare?
Grazie anticipatamente.

$xml = simplexml_load_file('');


for ($i=0; $i<=5; $i++){
$smallerImage=$xml->product[$i]->smallerImage;
$smallImage=$xml->product[$i]->smallImage;
$merchantImage=$xml->product[$i]->merchantImage;
$name=$xml->product[$i]->name;
$totalCost=$xml->product[$i]->totalCost;
$url=$xml->product[$i]->url;


echo "<div class=colshop><image src=".$smallerImage." ><br />";
echo "<image src=".$merchantImage." ><br />";
echo "<b>€ </b>".$totalCost."<br />";
echo "<div class=btnshop><a href=".$url." >dettagli ></a><br /></div></div>";

}


?>
 
HTML:
<a target='_blank' href=
Ciao, deve funzionare
 

Discussioni simili