Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP - Unbuffered While() Loop
    primarykey
    data
    text
    <p>I am using php, I see <code>while()</code> loop in php. I want to ask something can we use<br> <code>while()</code> loop as <code>mysql_unbuffered_query()</code>.<br> This code make good understanding. </p> <pre><code>&lt;?php echo 'While Loop is going to start'; $i = 0; while($i &lt;= 1000){ echo 'Now number is '.$i; $i++; } echo 'Continue to running script'; ?&gt; </code></pre> <p>What happens when we run this code first of all this code read <code>while loop is going to start</code><br> then read the while loop and create the statement to run <code>Now number is 0.....1000</code><br> then read <code>Continue to running script</code> And when the code is <strong>finished</strong> it print out whole data.But I did not want this.<br> What I want.<br> First script read the <code>while Loop is going to start</code> and print out then read while loop and<br> print out <code>Now number is 0</code> then go <code>Continue to running script</code> and print out But the <strong>back end</strong> of script while loop still working, My mean both <code>while loop</code> and <code>continue script</code> working at once.<br> This give you more understanding.<br> <strong>OUTPUT</strong>(First time when script running is start)</p> <pre><code> 1 - While Loop is going to start 2 - Now number is 0 3 - Continue to running script </code></pre> <p><strong>OUTPUT</strong>(Script running is continue) </p> <pre><code> 1 - While Loop is going to start 2 - Now number is 0 3 - Now number is 1 . - ............... 1000 - Now number is 1000 1001 - Continue to running script </code></pre> <p>Might be this is <strong>impossible</strong>.If yes how I can do that. </p> <p>But maybe this is possible like <code>mysql_unbuffered_query()</code>.<br> Like when while loop complete one cycle it print out the number and then other one and so on to complete.<br> <strong>OUTPUT</strong>(First time when while loop complete one cycle) </p> <pre><code>1 - While Loop is going to start 2 - Now number is 0 </code></pre> <p><strong>OUTPUT</strong>(while loop complete second cycle) </p> <pre><code>1 - While Loop is going to start 2 - Now number is 0 3 - Now number is 1 </code></pre> <p>If this is possible, Please guide me how can I do that.<br> Thanks..............</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload