Move php in views to module now and then i use php in views. Now i do this only when it's the only option. I often use this for specific action links (action links are links like: edit delete). 

Now i don't want to save php in my database, it doesn't belong there. So i was wondering if their was an other option to add those action links i generate with php to each row. The action links need data from the current row.

Thx
Nuctorn
You definitely want to create a views handler with your custom php code. This is the standard way to do custom php stuff on views module.

Here you have an example:

mymodule.info

...
files[] = views/handlers/views_handler_field_node_link_custom_stuff.inc
...


mymodule.module

/**
 * Implements hook_views_api().
 */
function mymodule_views_api() {
  return array(
    'api' =&gt; 3,
    'path' =&gt; drupal_get_path('module', 'MYMODULE') . '/views',
  );
}


In MYMODULE/views/mymodule.views.inc:

function mymodule_views_data() {
  $data['node']['custom_stuff'] = array(
    'field' =&gt; array(
      'title' =&gt; t('Custom link'),
      'help' =&gt; t('Provide a custom content link.'),
      'handler' =&gt; 'views_handler_field_node_custom_stuff',
    ),
  );
  return $data;
}


MYMODULE/views/handlers/'views_handler_field_node_link_custom_stuff.inc

/**
 * Field handler to present some custom HTML.
 */
class views_handler_field_node_custom_stuff extends views_handler_field_node {
  function construct() {
    parent::construct();
    $this-&gt;additional_fields['type'] = 'type';
  }
  function query() {
  $this-&gt;ensure_my_table();
  $this-&gt;add_additional_fields();
  }
  function render($values) {
    $type = $this-&gt;get_value($values, 'type');
    $nid = $this-&gt;get_value($values, 'nid');
    return mymodule_print_my_link($nid, $type);
  }
};