Repeat line x to y every few second in php
<p>how i can repeat  code from line x to y in php By Ajax.</p>

<p>for example:</p>

<p>mycode:</p>

<pre><code>$info_2=('&lt;div id="infobox"&gt;');
echo $chat_2;
$info_query=mysql_query("SELECT * FROM info WHERE fuid='$uid' or luid='$uid' ");
$info_num=mysql_num_rows($info_query);
for($i=0;$i&lt;$info_num;$i++)
{
$info_fetch=mysql_fetch_array($info_query);
echo($info_fetch['username'].':'.$info_fetch['text'].'&lt;br&gt;');
}
</code></pre>

<p>$info_3=('');
echo $info_3;</p>

<p>now i need repeat this code every x second.</p>
