0

I echo a variable to the screen in a while loop. The variable increments by 1 up to 10.

So I show it on screen echo $a;

But I want to clear the screen from the previous value before it echoes the new one.

In Pascal for example it was ClrScr;.

I looked a bit for the code to clear screen but I don't think what I found is exactly what I wanted, nor did I understood it :P

RealAnyOne
  • 125
  • 3
  • 3
  • 17
  • 1
    Refer to http://stackoverflow.com/questions/24327544/how-can-clear-screen-in-php-cli-like-cls-command – viclim Apr 01 '17 at 16:31

1 Answers1

0

After

echo $a;

You can add

echo exec('clear');
Gampesh
  • 4,024
  • 2
  • 12
  • 9