if you want a quick fix go buy "learn PHP in ten
minutes" and spend the next twenty years googling for
"how do I compute the length of a string"
pretty much summed up the PHP experience :)
If ALL applications in the world were interfaced by
(say) sockets + lisp S expressions and had the
semantics of the protocol written down in a formal
notation - then we could reuse things (more) easily.
nodejs apps are usually very close to that: small modular services interacting via sockets + events using json, protocol buffers, etc. Much like the unix pipe philosophy applied to servers.
If you didn't study CS and want to improve your knowledge of algorithms, I found Coursera classes to be very good.