You could add each iteration to an array by changing
Code: Select all
$mod = "<a href='article.php?". mysql_result($result,$i,'name')."'>itemname</a><br>";
to
Code: Select all
$modї] = "<a href='article.php?". mysql_result($result,$i,'name')."'>itemname</a><br>";
(note square brackets)
Then
to convert the array into a string, with each element seperated by a space. Then pass the string.
You could probably be more efficient by using SELECT name FROM frame77 instead of selecting everything. I suspect there is also a better way of looping, I prefer a different way, but if this is what you like, only change a little at a time or suddenly it won't work an you won't know why!