تفضل اخوي ملف php
كود PHP:
$trl = '0';
while ($shownews = mysql_fetch_array($qshownews)) {
++$trl;
if($trl=="2"){
$tr = '</tr><tr>';
$trl = '0';
}else{
$tr = "";
}
$shownews['news'] = titlecut($shownews['news'],$length=400,$count=4);
$shownews['newsname'] = titlecut($shownews['newsname'],$length=45,$count=4);
$shownews['tr'] = $tr;
$shown[]=$shownews;
print $easy->display('homepage.html');
ملف homepage.html
كود HTML:
<div align="center">
<table border="0" cellspacing="0" width="100%" dir="rtl" style="width: 620px">
<LOOP NAME="{shown}" >
<td dir="rtl" valign="top">
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right" valign="top"><table width="230" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="16" align="left"><img src="images/SCHOOLNET_44.gif" width="16" height="23" alt="" /></td>
<td width="200" align="right" background="images/SCHOOLNET_46.gif" class="newstitle"><table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right" dir="rtl"><a href="news.php?id={{id}}" target="_blank" class="nna">{{newsname}}</a></td>
</tr>
</table></td>
<td width="14" align="right"><img src="images/SCHOOLNET_49.gif" width="14" height="23" alt="" /></td>
</tr>
<tr>
<td colspan="3" align="right" class="dotborder" dir="rtl">
{{newsimg}}
<span class="mainfont"><img src="{{newsimg}}" alt="{{newsname}}" width="90" height="75" hspace="5" vspace="5" align="right" /></span>{{news}} <a href="news.php?id={{id}}" class="navstyle">التفاصيل</a></td>
</tr>
</table></td>
</tr>
</table>
</td>
{{tr}}
</LOOP>
</table>
</div>
اذا طلع لك خطأ خبرني .. لاني سويتها وانا مستعجل