OK I know PHP is server-based and completes processing before page result s presented as HTML code. But I have some scripts with relatively long processing times since they are accessing a large database and I want to report on progress. The options I have considered are
Split the large script into smaller ones and echo status at end of each script. Each script then calls next in sequence - this makes maintenance more complicated.
Keep a large script but have it complete one section, echo progress and then call itself with a var to know which section to process next - not sure if it will cause problems with a script calling itself multiple times and not sure best way to pass the var.
Look at another technology such as Ajax, never used it, reluctant to learn another discipline but willing if it gives a solution.
I am not looking for someone to give me a script or anything like that but just advice, comments and ideas on my current options or other ideas to research