I am a great believer in writing what I term 'dynamic' code; PHP and MySql together allow us to do this; with the help of CSS and Javascript at times.
The last time I bothered to count them I found I had written over 5,000,000 lines of code! All of this code is available to me via my own server, and I can easily adapt it to suit different requirements.
There are lots of functions I have not even touched on here; like what can be done with images, individually or as a group i.e. a gallery.
The chances are that if you want to do something in particular on the Internet I have either already written the code to do it, or I can pretty soon find out how.
This is the beauty of the Internet as far as I am concerned, if you want to do something the chances are someone has already done it; so why re-invent the wheel? The secret is knowing where to look.
I will happily adapt and incorporate any code I have written into third party websites with no ownership or copywrite restrictions.