in views row-template, how to obtain rendered output of each item in multi-valued field? I have a custom row template, and I know I can obtain the rendered field output with:
$field_output = $view-&gt;render_field($fieldname, $view-&gt;row_index);

For a certain multi-valued field, I would now like to create an array of the rendered output of each item in the field.
$field_output[3] = rendered field output for 3rd item in my multi-valued field

Anyone know how I can do this?
UPDATE:
There are two approaches I am aware of, but neither is a good, robust solution.
Approach #1:  get_values()
One approach is to call get_values, and then grab the safe_value:
$vals = $view-&gt;field[$fieldname]-&gt;get_value($row);
$field_values = array();
foreach ($vals as $i=&gt;$v){
  $field_values[$i] = $v['safe_value'];
}

The problem with this approach, as described here, is that (a) it breaks localization and (b) some fields do not have a safe_value.
Approach #2: render_field()
The second approach (see below) uses render_field() and then explodes the result:
$field_values = array();
$field_output_str = $view-&gt;render_field($fieldname, $view-&gt;row_index);
if (!empty($field_output_str)){
  $separator = ',';
  $field_values = explode($separator, $field_output_str);
}

The problem with this approach is that, in addition to exploding multi-valued fields, it also explodes individual fields that contain commas, such as text fields.
Does anyone have a better, more robust solution?
If the field is multi-valued, then $view->render_field($fieldname, $view->row_index) returns a comma-separated string of the individual rendered items:

rendered_item0,rendered_item1,rendered_item2,...


To generate the array $field_output_array where $field_output_array[2] = rendered_item2, explode the string:

$field_output_string = $view-&gt;render_field($fieldname, $view-&gt;row_index);
$separator = ',';
$field_output_array = explode($separator, $field_output_string);