对数组随机取一条进行渲染


        <widget name="ad_ar1">
		<php>
			$ad_1 =$widget['vars']['ad_arr'];
			$adrand=rand(1,count($ad_1))-1;
		</php>
			<a href="{$ad_1[$adrand]['link']}" target="_blank">
				<img src="{:cmf_get_image_url($ad_1[$adrand]['icon'])}" alt="{$ad_1[$adrand]['title']}" style="width: 100%;">
			</a>
	</widget>