问题
I am using echo to display output to the browser window. I have a while loop calling a function that displays the values on a two-dimensional grid, essentially like a table. As things are, calculations are made, and the table is rendered line-by-line to the screen as those calculations are made.
However, if I update the table, showing changes caused by subsequent calculations, I have to reprint the entire table below the first. I would like to return the cursor to the top-left corner and print the update over the original, so that the table appears just to update itself at the time of (re-) calculation. Is this possible using PHP?
I have found various references to this general question, but none in the context of the browser. (With browsers, the term "cursor" is generally used to refer to the pointer.)
来源:https://stackoverflow.com/questions/61552841/how-to-send-cursor-home-in-php