php and css
Posted 24 October 2006 - 11:09 AM
Having css,php and html all in the 1 webpage can look messy. I can do it by including the php script where it is requires in a div tag.
Is there any easier or standard way to have 3 different code types on the 1 webpage?
Posted 24 October 2006 - 03:37 PM
Having said that, IMHO it is fine to have PHP and HTML in the same file as long as you try your best to make it readable, standards based, and use semantic markup. Also, try to do all the logic in one place, and then echo the result in the relevant HTML.
For CSS, I would definitely stress that you use external stylesheets which can be linked to from within that file.
For CSS, have a look at http://www.w3schools...s/css_intro.asp
There are probably many schools of thought on this topic, but that's my 2p worth!
Posted 24 October 2006 - 03:45 PM
Whichever you choose, the end result is seperation of your business logic from your presentation - leaving a set of nice clean HTML documents and a set of nice PHP scripts.
I say old chap, that is rather amusing!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users