在EOD内的php中输出一个数组

I have the following php script:

<?php

$favorites = mysql_query(" SELECT * FROM `likes` WHERE `the_comment_id`='{$row['comments_id']}'  ");    

while($e = mysql_fetch_array($favorites)){
    $like_users = $e['user'];
    $array[]=$like_users;
}

$comments .= <<<EOD
<table><td> PRINT ARRAY HERE {$array[0]} </td></table>  
EOD;
?>

is it possible to print all array contents inside the EOD; I used {$array[0]} but prints me only the first array contente of course. How can I change it to print me all content of array? Any idea? Thanks

Why not just implode your array and then pass it inside the HEREDOC ?

$arstring = implode(' ',$array); //<--- Implode your array with space as the delimiter
$comments .= <<<EOD
<table><td> $arstring </td></table>  
EOD;
?>