I'm not sure I would recommend it today, but at the time I read it, in the mid 2000s, it did change my view on these "unmaintainable" technology stacks. I later came across the fusebox architecture/pattern, originally from ColdFusion - and realized that many PHP programmers had skipped some history, ending up reinventing code structure, sometimes badly.
Note that fusebox has grown and changed, I'm mostly talking about the fundamental ideas, and I don't think the later "port" to using XML was a very elegant or good idea. For those interested, see:
https://en.wikipedia.org/wiki/Fusebox_(programming)#Fusebox_... and most of the rest of that page.
"Designing Active Server Pages - Scott Mitchell's Guide to Writing Reusable Code" http://shop.oreilly.com/product/9780596000448.do
I'm not sure when I bought it, but it came out in 2000. Around that time, I'd seen some pretty nasty php, not much asp (but enough VisualBasic to start looking for a pitchfork whenever I saw it mentioned) -- and shortly after I worked as a sys.admin. at a place with a significant investment in Coldfusion (arguably the first php/asp-style language).
I've yet to write any classical ASP, and do anything more than glance at newer .net and what-not -- but I still got a lot from that book.
It, along with some of the posts I found on the Coldfusion fusebox framework/pattern[1] did a lot for helping me keep the difference between "bad language" and "bad programmer" straight.
Just because most all php code I've seen is crap, doesn't mean all php code is crap. And it didn't have to be in the early days either.
Another fun book that's somewhat related (in my mind anyway) is:
"Program Generators with XML and Java" by J. Craig Cleaveland (Prentice-Hall, 2001) http://craigc.com/pg/
(Sometimes one finds great technical books on sale, too!)
Two books I enjoyed despite, rather than because of the language:
"Program Generators with XML and Java" (aka "program generators for fun and profit") https://www.amazon.com/Program-Generators-Java-Craig-Cleavel...
And:
"Designing Active Server Pages" https://www.amazon.com/Designing-Active-Server-Pages-Mitchel...
The latter mostly for techniques to keep programs structured even when writing mostly in template soup (like php, asp, coldfusion etc).