Want to grab page content by using id of the page,then the following code stuffs you.
function spi_get_content_by_id($id) {
$data = get_page($id);
if ($data) {
return apply_filters('the_content', $data->post_content);
}
else return false;
}
This line makes sure that automatic paragraphing and nice curls are returned just like the editor content.
return apply_filters('the_content', $data->post_content);
If you want raw content,use the following piece of code
return $data->post_content;