How to convert a block with views content into code?
You could also use something like this:

$view = views_get_view('view_name');
$view-&gt;set_display('block_display_name'); 
$view-&gt;set_arguments(array($arg1, $arg2)); //only if you need arguments
$view-&gt;execute();
foreach($view-&gt;result as $res) {
  // extra stuff here
}