foreach($images as $v){ echo '<img src="'.$v.'" border="0" style="width:100px;float:left;" />'; echo '<a href="' . $v . '">' . $v. '</a>';}