Estou com a seguinte situação:
<?php
$args = array('post_type'=>'post', 'showposts'=>-1);
$my_posts = get_posts( $args );
$count = 0 ;
if($my_posts) : foreach ($my_posts as $post) : setup_postdata( $post );
?>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3 pad-b">
<!-- modal -->
<?php the_post_thumbnail(false, array('type'=>'button', 'class'=>'img-responsive', 'data-toggle'=>'modal', 'data-target'=>'#myModal<?php echo $count; ?>')); ?>
<div class="modal fade bs-example-modal-lg" id="myModal<?php echo $count; ?>" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<?php the_post_thumbnail('full'); ?>
</div>
</div>
</div>
<!-- fim modal -->
</div>
<?php
$count ++ ;
endforeach;
endif;
?>
Eu preciso que o $count seja impresso dentro do array data-target do the_post_thumbnail.
<?php the_post_thumbnail(false, array('type'=>'button', 'class'=>'img-responsive', 'data-toggle'=>'modal', 'data-target'=>'#myModal<?php echo $count; ?>')); ?>
Qual a melhor maneira de fazer isso?
'data-target'=>"#myModal{$count}"
?