Код |
---|
$arPics = array( '/img/pic0.jpg', '/img/pic1.jpg', '/img/pic2.jpg', '/img/pic3.jpg', '/img/pic4.jpg', ); $nn = 0; foreach ( $arResult['ITEMS'] as $item ) { ?><a href="..."><?=( strlen( $arPics[ $nn ] ) > 0 ? '<img src="' . $arPics[ $nn ] . '" />' : '' )?>.....</a><? $nn++; } |