Comma seperated text field into a HTML ol I have created a custom content type and one of the fields will be a texfield with values separated by a comma e.g.

value 1, value 2, value 3

I want to then display this as an unordered list in the output.

Can anyone help with how this can be achieved?

Thanks
You can make use of hook_node_view like this

function hook_node_view($node, $view_mode) {
  // explode the field contents with comma
  // replace the content with your exploded value.
  $node-&gt;content['yourfield'] = 'YOUR_EXPLODED_VALUE';
}


explode