Can tools like these fix code like that, or at least help? It would have taken me about a day per page just to make it readable - and there were dozens of pages. I don't plan on going back into that minefield if I can help it, but it would be good to know in the future.
--EDIT-- Thanks for all the helpful replies. Luckily I'm pretty sure the project is behind me. Seeing that PHP reminded me of old bad ASP (pre .NET) - it was easy to get away with lots of really bad stuff (on error resume next anyone?). It makes me wonder if auto-refactoring spaghetti is a crackable problem. When I dared look I did see lots of things that I could have fixed with a little bash and sed, but of course I am human so I understand the 'intent' of the code. Fascinating stuff.