I have a view that takes fields and combines them or compares them and then gives me results in a new field (views conditional, global text etc..) but I need the TYPE of data that is returned. How can I figure this out? I do not have Drush on my current setup or we'd be good to go... I looked in the DOM and see nothing special about the field for example...

2 Answers 2


Use Php views and in it use gettype, I think you can acheive it by Php views ( also you can achieve it with hook_views_pre_render) and return data tye with gettype.

gettype — Get the type of a variable Description

string gettype (mixed $var )

Returns the type of the PHP variable var.

  • I am not getting any results with this. I tried it in the content: custom php field. Should I be doing it elsewhere? Sep 16, 2015 at 15:24

You can install devel and use <?php dsm($fields) ?> inside views-view-fields.tpl.php which you need to place inside the templates folder of your theme.

This will give the results similar to var_dump but in a much readable and organized format.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.