• Resolved ThorHammer

    (@thorhammer)


    Hi. I am using the following code to get and display thumbnails from a custom field valued “the_field”. It works fine, but when I have too many of these thumbnails it breaks my design. How do I limit the output from the code below to a certain amount and force the following output on a new line?

    <?php $the_field=get_post_meta($post->ID,"the_output",false); ?>
    
    <?php foreach($the_field as $the_output)
    {
    list($width, $height, $type, $attr) = getimagesize($the_output);
    ?>
    <img src="<?php echo $the_output;?>" <?php echo $attr; ?> alt="">
    <?
    
    }?>

    Any help would be higly appreciated!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘A PHP-issue’ is closed to new replies.