Load a variable displayed in devel I'm using devel to find specific fields I'd like to be able to access in a template I have for a user profile page (user-profile.tpl.php)

The field values are present in devel just fine however I'm not sure what to do with the path it gives me.



I see the info I need, (created = 1349810890)
and I see a path that devel has given me $...->created but I'm not sure what to replace $... with to get access to that field.

I've attempted the following

$node-&gt;created;
$page-&gt;created;
$user-&gt;created;
$node['created'];
$content-&gt;created;
$variables-&gt;created;
$variables-&gt;node-&gt;created;


And several others with no luck
Are you operating on the user account object?

If so, it should be:

$variables['account']['user']-&gt;created;


Which would be used at the template_preprocess function level. From the actual template itself, unless you have intimate knowledge of what was passed to $variables, you will sit there and guess all day long and not get far. Even I am guessing. The only way to know exactly what you have to work with is by using a real debugger.

The best option is implementing a debugger like xdebug so you can get a better idea of whats going on.


Atom has a package: https://atom.io/packages/php-debug 
PHPStorm is
simple to setup: https://www.youtube.com/watch?v=jkv0dzW3IM4


It will save a lot of time if you leverage it over devel. You can then set a breakpoint in your template_preprocess function in template.php, inspect all the variables being passed to that appropriate template, and print or modify as you need.