Get a Drupal node using a node id

If you would like to access node data but only have the node id ($nid in this case) all you need to do is:

$node = node_load($nid);


This lacks some "content". To generate that we can take this one step further:

$node = node_build_content(node_load($nid));
0 Responses