Outputting a custom field in PHP

Setting the third parameter of get_post_meta to true does not guarantee that you get a string. What that parameter does is control how many rows of the database get returned. When true you only get a single result and not an array of all of the rows in the database that match. You will get a single value but it will only be a string if you’ve saved a string to the database. If you’ve saved an array, you will still have an array.

There is a note in the Codex about this:

If you fetch a serialized array with this method you want $single to
be true to actually get an unserialized array back. If you pass in
false, or leave it out, you will have an array of one, and the value
at index 0 will be the serialized string.

http://codex.wordpress.org/Function_Reference/get_post_meta

It sounds like that is what is happening. The data associated with your item_ key is an array (serialized) in the database and so it is still an array even though it is a “single” result. I can’t with confidence tell you how to retrieve that but it should be something like:

$my_meta = get_post_meta($post->ID,'item_',TRUE);
echo $my_meta[0]; // or
echo $my_meta['some_key']; 

In the context of your code you wouldn’t need the echo because you are using the string not printing it.