phpwindowslinuxcommand-linephp-5.3

How do I remove text from the console in PHP?


My goal is to print an updating progress percentage to the console (in both Linux and Windows). Currently I just print out the percentage each 10%, but I would prefer that it updated itself every 1% without filling the screen with percentages.

Is it possible to remove text you have written to the console in PHP?


Solution

  • echo chr(8);
    

    will print a backspace character.