$foto="paginas/".$id.".jpg"; if (file_exists($foto)){ $n=""; $s="<img src=".$foto." height='111' width='147'/>"; }else{ $n="colspan=2"; $s="";}