Im using the last.fm API to fetch XML data. I've then parsed this data and loaded my results into an array. However Im unsure of how to manipulate this data as single elements (I basically want a button for each element that will submit to a database table when the user clicks it)
(I've only included what I think is the relevant code, if any more is required just say)
$artistArray = array();
$releases = $xmlmusic->xpath('artist/similar/artist');
foreach ($releases as $artist) {
$artistResult .= '<div class="searchitem">';
$artistName = $artist->name . PHP_EOL;
$artistArray[] = $artistName;
This inputs the data into an array, but I'm really stuck on how to use it, any help is appreciated, thanks.