I am a php beginner coder.
I always find myself in a mess when I try to alter or add something to my scripts. Because they are not well organized.
So, I want to learn how to organize my code, so it becomes easy later on to change it.
Also, there is a lot of code snippets that I use frequently in all of my scripts. Like the database codes. Is there is a way to arrange those snippets?
Best Answer
Learn Object-Oriented Programming:
http://php.net/manual/en/language.oop5.php
http://www.zend.com/en/services/training/
http://www.phpfreaks.com/tutorial/oo-php-part-1-oop-in-full-effect
http://www.killerphp.com/tutorials/object-oriented-php/