Is it possible to put the results from an array into a string?
<? foreach($get->artist->tags->tag as $tags) {
$tags = (array) $tags;?>
<? echo $tags['name'];?>
<?}?>
is it possible to also make a string that seperates all of $tagsnames with commas?
For example let's say the tags are
House Electronic Pop R&B
Is it possible to create a string like this
$mystring = House,Electronic,Pop,R&B
thanks
UPDATE :
$laststation = implode(',', array_column($get->artist->tags->tag, 'name'));
$laststation = addslashes($laststation);
$laststation_array = explode(',', $laststation);
$laststation_search = implode("%' OR `tags` LIKE '%", $laststation_array);
$query5 = mysql_query ( "SELECT * FROM `Stations` WHERE `tags` LIKE '%".$laststation_search."%' AND `status` = 'Online' ORDER BY RAND() LIMIT 8" );
I have tried using implode as above, but does not seem to be giving any results back.