Custom Fields Values printing the word "array"
-
Hi there,
I’m having an incredibly frustrating time trying to figure this out. I’ve tried just about everything.
I’m developing a site on my localhost with windows vista. (I’m not sure if this has anything to do with the problem)
Everything I’ve tried to print or echo values of a custom field is only returning the word “array”.
<?php $styles = get_post_meta($post->ID, 'style', false); ?> <ul> <?php foreach($styles as $style) { echo '<li>'.$style.'</li>'; } ?> </ul>Returns:
<ul><li>Array</li></ul>Help!!!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Custom Fields Values printing the word "array"’ is closed to new replies.