Rambler's Top100
, : |

! : http://dreamweaver.net.ru/new-forum/

| FAQ | | |

Совмещение цикла php и javascript

 
  ,         .     ,        .     Форум Macromedia Dreamweaver -> Скрипты Java
 
nikolaalimov
Новичок

Новичок


: 31

: 21.09.2012
: 18

: 06, 2012 3:38 pm     : Совмещение цикла php и javascript

Необходимо добавить скрипт подзагрузки контента по мере скроллинга в следующий php код:


<?php


$result = mysql_query ("SELECT * FROM boe", $db) ;



$array = array();

while($myrow = mysql_fetch_array ($result))

{
$array[] = $myrow;
}



for ($i = 0, $cnt = count($array); $i < $cnt; $i += 5){



printf ( " <table width='300' height='271' align='center'>
<tr>
<td height='265' colspan='6' align='center' valign='middle'>



<table width='187'>
<tr>
<td height='25' colspan='2' align='center' valign='bottom'>%s</td>
</tr>
<tr>
<td height='205' colspan='2' align='center' valign='middle'>%s</td>
</tr>
<tr>
<td width='125' height='33' align='center'>&nbsp;</td>
<td width='50'>&nbsp;</td>
</tr>
</table>



</td>
<td width='141' align='center' valign='middle'>







<table width='187'>
<tr>
<td height='25' colspan='2' align='center' valign='bottom'>%s</td>
</tr>
<tr>
<td height='205' colspan='2' align='center' valign='middle'>%s</td>
</tr>
<tr>
<td width='125' height='33' align='center'>&nbsp;</td>
<td width='50'>&nbsp;</td>
</tr>
</table>

</td>
<td width='141' align='center' valign='middle'>







<table width='187'>
<tr>
<td height='25' colspan='2' align='center' valign='bottom'>%s</td>
</tr>
<tr>
<td height='205' colspan='2' align='center' valign='middle'>%s</td>
</tr>
<tr>
<td width='125' height='33' align='center'>&nbsp;</td>
<td width='50'>&nbsp;</td>
</tr>
</table>

</td>
<td width='141' align='center' valign='middle'>







<table width='187'>
<tr>
<td height='25' colspan='2' align='center' valign='bottom'>%s</td>
</tr>
<tr>
<td height='205' colspan='2' align='center' valign='middle'>%s</td>
</tr>
<tr>
<td width='125' height='33' align='center'>&nbsp;</td>
<td width='50'>&nbsp;</td>
</tr>
</table>

</td>
<td width='141' align='center' valign='middle'>







<table width='187'>
<tr>
<td height='25' colspan='2' align='center' valign='bottom'>%s</td>
</tr>
<tr>
<td height='205' colspan='2' align='center' valign='middle'>%s</td>
</tr>
<tr>
<td width='125' height='33' align='center'>&nbsp;</td>
<td width='50'>&nbsp;</td>
</tr>
</table>



</td>
</tr>
</table>
"

,$array[$i]['name'], $array[$i]['image'],
$array[$i + 1]['name'],$array[$i + 1]['image'],
$array[$i + 2]['name'],$array[$i + 2]['image'],
$array[$i + 3]['name'],$array[$i + 3]['image'],
$array[$i + 4]['name'],$array[$i + 4]['image'],
$array[$i + 5]['name'],$array[$i + 5]['image']


) ;




}




?>
:   
  ,         .     ,        .     Форум Macromedia Dreamweaver -> Скрипты Java : GMT + 2
1 1

 


Powered by phpBB © 2001, 2005 phpBB Group
phpBB


/ : 134861 / 0

Rambler's Top100 @Mail.ru