What is the variable format to reference Views field data in a Global PHP that resides in a footer/header? Currently its annoying to have to manually parse through the views results data by either doing a print_r() or a dsm() via devel. Does anyone know how to reference a field via PHP when you put in a Global PHP field in either the header or footer of the View?
To reference a Views field result here's the format of the variable when using a PHP Global in the footer/header in a Views display:

$results[0]-&gt;field_**&lt;FIELD NAME&gt;**[0]['raw']['**&lt;VARIES DEPENDING ON TYPE OF FIELD&gt;**']


This is in reference to a taxonomy id (tid) reference:

$results[0]-&gt;field_field_device_type[0]['raw']['tid']


This is in reference to a text field called full_name:

$results[0]-&gt;field_field_full_name[0]['raw']['value']


The [0] represents each result row and the last array value usually changes depending on the field type (text,reference,image, etc.) So its better to dsm or print_r() if you really need to reference something that your not sure of.

Here's a sample output of the array structure so you can get an idea of how its laid out:





Here's a better view of the array output of a view's result when you do a print_r() within the header. I had to apply this to another view and forgot how to reference the variables. So here's the full output when you do a print_r($result[0]->field_field_machine_type): (keep in mind it has to be "field_field" when you reference a field.

     Array
(
    [0] =&gt; Array
        (
            [rendered] =&gt; Array
                (
                    [#markup] =&gt; Tablet
                    [#access] =&gt; 1
                )

            [raw] =&gt; Array
                (
                    [tid] =&gt; 105
                    [taxonomy_term] =&gt; stdClass Object
                        (
                            [tid] =&gt; 105
                            [vid] =&gt; 9
                            [name] =&gt; Tablet
                            [description] =&gt; 
                            [format] =&gt; plain_text
                            [weight] =&gt; 0
                            [vocabulary_machine_name] =&gt; machine_type
                            [rdf_mapping] =&gt; Array
                                (
                                    [rdftype] =&gt; Array
                                        (
                                            [0] =&gt; skos:Concept
                                        )

                                    [name] =&gt; Array
                                        (
                                            [predicates] =&gt; Array
                                                (
                                                    [0] =&gt; rdfs:label
                                                    [1] =&gt; skos:prefLabel
                                                )

                                        )

                                    [description] =&gt; Array
                                        (
                                            [predicates] =&gt; Array
                                                (
                                                    [0] =&gt; skos:definition
                                                )

                                        )

                                    [vid] =&gt; Array
                                        (
                                            [predicates] =&gt; Array
                                                (
                                                    [0] =&gt; skos:inScheme
                                                )

                                            [type] =&gt; rel
                                        )

                                    [parent] =&gt; Array
                                        (
                                            [predicates] =&gt; Array
                                                (
                                                    [0] =&gt; skos:broader
                                                )

                                            [type] =&gt; rel
                                        )

                                )

                        )

                )

        )

)