如何在foreach循环中为每个结果添加不同的文本
例如
图1,“示例文本1”,图2,“示例文本2”
<?php
$id = 51;
$count = 0;
$is = get_children("post_parent=$id&post_type=attachment&post_mime_type=image&order_by=ASC");
foreach($is as $i) {
$url = wp_get_attachment_image_src($i->ID, \'full\');?>
<img src="<?php echo $url[0]; ?>">
<?php
}
?>