- This topic has 3 replies, 2 voices, and was last updated 2 months, 3 weeks ago by .
I am using EXACT the method described in your own documentation to show a single image:
<?php $images = rwmb_meta( 'xximagefieldxx', array( 'limit' => 1 ) ); $image = reset( $images );?> <img src="<?php echo $image['url'];?>" width="xx" height="xx>
but getting a PHP error:
WARNING: reset() expects parameter 1 to be array, string given in var/www/xxx/ eval()'dcode on line 3
So what’s wrong? Documentation?
It’s worth mentioning that currently only one picture is stored in the field…
Seems reset( $images ) refers to the same Image ID (the only existing one), maybe this is the error.
The picture itself is printed out to html.
- You must be logged in to reply to this topic.