Getting body of a node to display in a block using PHP code I've created a block and put some php in it to display the body of a node using the code form here: http://drupal.org/node/300910#comment-4183142

&lt;?php
//get the ID from the URL
$node_id = basename($_SERVER['REQUEST_URI']);
echo $node_id;
//Load the node object.
$node = node_load($node_id);
//Get the node array into memory.
node_view($node);
//Now you can parse only the body value into a variable.
$node_content = $node-&gt;content['body']['#value'];
//Printing content.
echo $node_content;
?&gt;


The page I've tried this on prints the ID in the block (as expected) but not the body of the node with that ID.

My hunch is that $node_content = $node-&gt;content['body']['#value']; can't be used in a block.

Any thoughts?
Thanks!
I found out how to do this:

$node_id = basename($_SERVER['REQUEST_URI']);
$node = node_load($node_id);
echo $node-&gt;body['und'][0]['value']


I have also found out that there is probably a better way to do this using field_view_value(),
but I am not quite sure how that works.