By FranCarstens on
I'm trying to display the following info (per example):
[field_shirt_code] => Array
(
[0] => Array
(
[value] => MC1
[view] => MC1
)
)
What I want to display in the node is:
Field Code: MC1
But I can't for the life of me get the MC1 to display. All I get is "array".
I'm not a PHP programmer. The logical code for me is:
print $field_shirt_code['0']['value']
But this obviously(?) does not work.
Any ideas?
Comments
try removing the quotations
try removing the quotations around the 0
http://www.mpiccinato.net
Great!
Thanks MPiccinato,
That worked great. Another problem I've run into (same situation).
Trying to output it like this did not work:
It leaves me with a blank screen.
-- If no-one asked Drupal questions there would be no Drupal answers --
Got it figured
This works:
I don't know why though, so if someone can explain, that'll be nice.
-- If no-one asked Drupal questions there would be no Drupal answers --