First, why
echo "$myarray";
?
Use:
echo $myarray; // no quotes
Without quotes, this is a bit easier on PHP. Plus, its less typing for you.
Second, $myarray is an array. Which is what you originally asked for. Trick is you now have to handle outputting the array, which is not what you're doing. You can't just do echo $myarray and hope it works. PHP will just say "Array." So, you could use a for loop:
for($a = 0, $count = count($myarray); $a < $count; $a++)
echo $myarray[$a] . '<br />';
You could use join/implode, but then I'd question why you're splitting/exploding and then rejoining/imploding. Because there might be an easier way to manipulate the string.