Hi,

I would like to get the value of a CCK custom field from a block:

$_node = node_load(15);
print $_node-> field_psauthor[0]

I expected this code to do the trick, however all it displays is "Array", I've also tried
print $_node -> field_psauthor;
But I also get the same "Array" instead of a string value.

Thanks,

Comments

gafir777’s picture

After doing a print_r for the $_node, here is what I see:
[field_psauthor] => Array ( [0] => Array ( [value] => John Lennon ) )

But it's John Lennon I want to see (who doesn't!), not "Array", in my page.

gafir777’s picture

$_node-> field_psauthor[0][value]

And John Lennon appeared!