problems with item() and multiple entries in the same metadata field

Hi all -

I've been working on the display order for metadata fields in items/show.php & have run into a curious problem.

<?php echo item('Dublin Core', 'Subject'); ?>
works without any issues.
<?php echo item('Dublin Core', 'Subject', array('all'=>'true')); ?>
doesn't work. The returned value is "Array".
The second example is cribbed directly (with a field value change) from

Has anyone else encountered this problem?

Apologies - I should have mentioned that I definitely have multiple values in the Subject field.

When I use the default show_item_metadata, all three values are returned/displayed.


and another apology for the typo in the first post!
that should read
<?php echo item('Dublin Core', 'Subject', array('all'=>true)); ?>

I've either had too much coffee, or not enough...


You are on the right track with the example from the codex. A couple things. First you need to drop the 'echo' from the line you have. That will just print a confirmation that you have an array, not the array itself. Going back to the Displaying All Values section in the codex, just follow the second part of the instructions in that section which indicate how to set and return a loop for those values.

Hope that helps,

Hi Ken -
thanks for the reply.

With a bucket-load of help from a coworker, here is the result:

<?php echo item('Dublin Core', 'Coverage', array('delimiter' => ', ', 'all' => null)); ?>
echo and delimiter are both required -- without echo, we're not getting any result, and without delimiter we're only getting the first field value.

Thanks again for the pointers!