Drupal snippet php - ultimi tre nodi di un tipo di contenuto specifico

<?php
$nlimit =3;
$type = "articolo";

$result = db_query_range(db_prefix_tables("SELECT n.created, n.title, n.nid, n.changed
FROM {node} n
WHERE n.type = '$type'
ORDER BY n.changed
DESC "), 0, $nlimit);
while ($node = db_fetch_object($result)) {
$items[] =node_view(node_load(array('nid' => $node->nid)), 3);
}

if (isset($items) && is_array($items) && count($items) > 0)
{

echo "

";
foreach ($items as $item)
{
echo "
" . $item . "

";
}
echo "

";
}
?>