Im about to start a new project at home and this time I want to create everything in an organized way and hopefully I learn how to work with PHP OO with css based xhtml code.
Anyways, I know that ASP now is MVC based (Model-view-controller) so that you easily use and reuse componenets and I also heard that PHP doesn't have that good support for this. But I don't know anything about ASP and would rather use PHP so is there some golden rule how you should work in php?
I know that static functions is a good option when you work with componenets, for example:
Is this the best way to create and recreate componenets in PHP 5?PHP Code:
myClass::Button("this is my button label");
And should I still use the old:
or should I use static functions here too?PHP Code:
I want to write everything inside php tags (<?php and ?>)
so how can I keep the xhtml code with a good structure, for example:
would output <div>...</div><div>...</div> in one single line, will I have to add \n in the end of every linebreak I want to make?PHP Code:
I probably have some more questions when I get going but for now this will do.