hello,
i am a programmer but i have never coded in PHP. I am building a PHP based site with thousands of pages through a friend who claims to be proficient in PHP.
Anyway, he is suggesting that we embed PHP code within the HTML files but I have heard that it is better to keep HTML and PHP functions separate.
Please advise which method is better for coding and any input you guys can give will be great. We just want to be build an efficient site that we can easily update the design and code.
Thank you
includes or embedded coding?
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Very similar thread from today... viewtopic.php?t=73973
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
He shouldn't have to list the pros and cons. Your own research should tell you enough. We aren't here to spoon feed you an answer.
Many template engines (ignoring that PHP is one) can run many native functions, however true templates shouldn't need overly complicated things in them like function calls. They are supposed to be straight forward so they are easily modified. The things filling the data it works with can be as complicated as one wishes however. If the template has to know about the inner workings of things beyond the basics, it probably needs further refinement upstream.
Many template engines (ignoring that PHP is one) can run many native functions, however true templates shouldn't need overly complicated things in them like function calls. They are supposed to be straight forward so they are easily modified. The things filling the data it works with can be as complicated as one wishes however. If the template has to know about the inner workings of things beyond the basics, it probably needs further refinement upstream.
feyd wrote:He shouldn't have to list the pros and cons. Your own research should tell you enough. We aren't here to spoon feed you an answer.
Many template engines (ignoring that PHP is one) can run many native functions, however true templates shouldn't need overly complicated things in them like function calls. They are supposed to be straight forward so they are easily modified. The things filling the data it works with can be as complicated as one wishes however. If the template has to know about the inner workings of things beyond the basics, it probably needs further refinement upstream.
if you cannot help then keep your mouth shut.
i am not asking to be spoon fed, simply asking for preferences based on experience.