I have a for loop displaying XML data from the last.fm API. Im wanting to add a button to each individual result from the query, however It is simply appearing as a piece of text and not recognized as a button.
$xmlmusic = new SimpleXMLElement($result);
$releases = $xmlmusic->xpath('artist/similar/artist');
foreach ($releases as $artist) {
$artistResult .= '<div class="searchitem">';
$artistName = $artist->name . PHP_EOL;
$artistResult .= $artist->name . PHP_EOL;
$artistResult .= '<form name="favourite" action="'.$_SERVER['PHP_SELF'];'" ." method="POST">';
$artistResult .= '<input type="submit" id="graphic" value="favourite">add</form>';
$artistResult .= '</div>';
<?php echo $artistResult ?>
This is displaying as a small box with "add" however it isn't being seen as a button.
Link to page: Artist Search
Any help is appreciated,
JB