Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7928329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:42:05+00:00 2026-06-03T19:42:05+00:00

for($x=0;$x<100000;$x++) { echo hello $x; } So, normally, it will finish processing everything first

  • 0
for($x=0;$x<100000;$x++) {
    echo "hello $x";
}

So, normally, it will finish processing everything first and then print everything at once. Is there a way to just keep printing the message as the command is sent, so that I’ll see a new hello $x appended one by one or do I have to use jQuery/JavaScript?

Update:

I ask because I’m trying to run a long test script and have it show all the results 1 by 1 on the browser so I don’t have to go check the logs and could just visually see the color coded results. I’m trying to make a similar effect to this: http://tools.css3.info/selectors-test/test.html If anyone could provide a short sample of the jQuery (if it has to be done this way), I would appreciate it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T19:42:07+00:00Added an answer on June 3, 2026 at 7:42 pm

    Although it’s possible by controlling the output buffer, I wouldn’t do that, mainly because it will delay the JavaScript DOMReady event.

    If you’re looking for a visual effect, you should use JavaScript (but I don’t see any reason for Ajax based on what your question says). It can be accomplished with a simple setInterval. Considering an initially empty <div id="hello">:

    var i = 0;
    var timer = setInterval(function(){
        if(i == 10000) {
            clearInterval(timer);
            return;
        }
        var div = document.getElementById('hello');
        div.innerHTML += 'hello ' + i + '<br>';
        i++;
    }, 250);
    

    I just saw your edit, and now I think you actually should use Ajax! The example you linked to does. Basically, you have to setup a test queue in JavaScript, where each test has an unique URL. Then it’s just a matter of firing one request at a time with Ajax (jQuery and $.get would be the easiest way to go). The following assumes an <ul> instead of the div from my previous example, and that the server will respond with a success or failure message for each test:

    var tests = [
        'http://example.com/test1',
        'http://example.com/test2',
        'http://example.com/test3',
    ];
    
    function processQueue() {
        if(tests.length > 0) {
            var test = tests.shift();
            $.get(test, function(response) {
                $('#some_ul').append('<li>' + response + '</li>');
                processQueue();
            });    
        }
    }
    
    processQueue();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm just wondering what's more costly, something like: echo Hello world, my name is
My code: year=[51-52,53,55,56,58,59,60,61] photo=[{70,72,73},{64,65,68},{79,80,81,82},{74,77,78},{60,61,62},{84,85,87},{57,58,59},{53,54,55,56}] for i in range(7): print <img src=\http://files.getdropbox.com/u/100000/Akuja/,year,/P10104,photo,.JPG\> I run it
I have this code: <?php for($i = 0; $i<30; $i++) { echo $i<br>; usleep(100000);
I'm trying to do an echo of a variable containing 1400000. so there is
I have 100000 Ids to store into our DataBase. Id is in string format.each
WITH TOP 100000 (100k) this query is finished in about 3 seconds WITH TOP
a) for(int i = 100000; i > 0; i--) {} b) for(int i =
Using Access Database Table ID Time 001 100000 001 100005 001 103000 001 102500
I have a big string having at most 100000 character. Instead of using string.charAt[index]
I'm trying to play only part of a sound using FMOD, say frames 50000-100000

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.