This first bit works:
$my_id = 617;
$post_id_7 = get_post($my_id);
$title = $post_id_7->post_excerpt;
echo $title;
While this second bit doesn’t:
$post_id_7 = get_post(617);
$title = $post_id_7->post_excerpt;
echo $title;
What gives?
http://codex.wordpress.org/Function_Reference/get_post
yeah what Samuel said.
So if you wrote it:
it should work.