Print result of $body on D7 and I've made this:

function project() {
  global $user;
  $uid = $user-&gt;uid;
  $name = $user-&gt;name;

  $teaser = 0;
  $page = 1;
  $type = 'page';
  $status = 1;
  $format = 3;

  $body = "&lt;script language=\"JavaScript\" src=\"/misc/collapse.js\" type=\"text/javascript\"&gt;&lt;/script&gt; ".
                "&lt;div&gt;&lt;p&gt;Projects from user ".$name."&lt;/p&gt;&lt;/div&gt;";
}
?&gt;


And I need to print the result on the main content of my theme, how can I do it? 
If I do echo "$body";I view the result not in the main content but as a single page. Thanks a lot.
&lt;?php print $node-&gt;body['und'][0]['value'];?&gt;