... aqui dejo el codigo que tengo ... gracias por la ayuda
Código PHP:
<?php
if($noticias){
foreach($noticias as $noticia){
?>
<div class="content">
<div id="myGallery">
<?php
$ID= $noticia[idArticulo]; $titulo = $noticia[titulo]; $contenido = $noticia[contenido];
$first = reset( explode('.',$noticia[imgroot]) ); $mid = '_s';$last = end( explode('.',$noticia['imgroot']) );
$img_root = "img/".$first.$mid.'.'.$last;?>
<div class="imageElement">
<img src="<?php echo $img_root ?>" class="full" />
<h3><p><span class="style1"><span class="style13"><?php echo $titulo ?></span></span></strong><br/><br/>
<?php echo substr($contenido, 0, 120); ?>... <a href="ver_articulo.php?id=<?php echo $ID ?>" target="_parent" class="claro" >ver más...</a></span><hr/>
<a href="#" title="open image" class="open"></a>
<img src="<?php echo $img_root ?>" class="thumbnail" /></h3></p>
<?php
}//Fin del foreach
}else{
echo "<br><br><p align=\"center\" ><span class=\"tcontenido\"> No hay artículos recientes</span> </p>";
}//Fin del if
?>
</div>
</div>
</div>
</div>