I just started learning php and too dump to figure out how to do the following by myself.
I have added the comments' body before the Virtual Formatted Field(VFF) and try to print it out in VFF together with other function (to be specific, the [collapse] text filter in order to display comments in a collapsible format). But all the following code failed:
[collapse]
print $data = $row->{$output->comment};
print $output->comment;
print $output;
[/collapse]
I'm sure php filter was selected. The [collapse] filter does work but the print $output not. I tried to just using print $output; without the text filter but still no luck. Please kindly help me for the correct code, thanks alot!
-------------
Appended the "Available variables" for reference.
The following variables are available for this display. Use the variable shown on the left to display the value indicated on the right. Note that due to rendering order, you cannot use fields that come after this field; if you need a field not listed here, rearrange your fields.
This Field
$field == Value of this field
This Row Fields (for more info see "Query" in "Live preview" below)
$row->nid
$row->comment
$row->format
$row->created
$row->sticky
All Rows
$rows[] == Indexed array. Values are arrays like $row.
This Row Fields Output (contains fields only previous to current)
$output->comment == Output of Comment: Body
This Field Name
$field_name == 'formatted'
This Row Index
$row_index == Index of current row. (Only if "row_index" patch is applied.)