By gafir777 on
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
After doing a print_r for
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.
fixed
$_node-> field_psauthor[0][value]
And John Lennon appeared!