Elton 171 Posted June 6, 2005 Share Posted June 6, 2005 I read the following: quote: it really is incredibly bad style to mix code and html though... if you are going to put html out in the middle of a load of code, you should prepare the html then print it. If it works, though, is it actually a problem? Anglers' Net Shopping Partners - Please Support Your Forum CLICK HERE for all your Amazon purchases - books, photography equipment, DVD's and more! CLICK HERE for Go Outdoors. HUGE discounts! FOLLOW ANGLERS' NET ON TWITTER- CLICK HERE - @anglersnetPLEASE 'LIKE' US ON FACEBOOK - CLICK HERE Link to post Share on other sites
rickster 0 Posted June 7, 2005 Share Posted June 7, 2005 elton i use ph and html alsong with jave and no problems, as you do the old websites the problem occurs when you do dynamic html ie the post command or GET that is because php will use Include instead. Visit our NEW FISHING Website (now updatedANGLERS-TALES Link to post Share on other sites
UK-Fishing-Tackle.co.uk 0 Posted June 8, 2005 Share Posted June 8, 2005 I work with PHP and HTML everyday and there is no problem mixing them up, in fact it works that way by design (otherwise PHP files would only contain PHP and would not parse with HTML in them). It's tidier to break them apart where possible. It's easier not to from a coding point of view. I am all for PHP questions - in my opinion an amazing server-side language that is highly under-rated by many Windows (ASP) programmers. Ian W Link to post Share on other sites
UK-Fishing-Tackle.co.uk 0 Posted June 8, 2005 Share Posted June 8, 2005 It's also proper to indent your code, but most of us never do that either In reality most of us tend to indent our PHP when we hit a bug and cannot fathom out our loops/conditional blocks!!! Ian W Link to post Share on other sites
corydoras 454 Posted June 9, 2005 Share Posted June 9, 2005 First of all Elton the bit about mixing php and html is just complete b0ll0cks! You could if you wanted to, name all the web page type files on your site *.php and everything should still work, albeit with a small performance hit because the php module would have to parse every page. Get into the habit of indenting you code properly. When I was an 'apprentice programmer' this was drummed into us. It makes your code easier to read, especially if someone other than the original author has to edit it, or you have to go and edit it yourself 9 months down the track. The problem isn't what people don't know, it's what they know that just ain't so.Vaut mieux ne rien dire et passer pour un con que de parler et prouver que t'en est un!Mi, ch’fais toudis à m’mote Link to post Share on other sites
Elton 171 Posted June 9, 2005 Author Share Posted June 9, 2005 Cheers, guys. The thing I had to do hasn't bust yet, so it must be okay Anglers' Net Shopping Partners - Please Support Your Forum CLICK HERE for all your Amazon purchases - books, photography equipment, DVD's and more! CLICK HERE for Go Outdoors. HUGE discounts! FOLLOW ANGLERS' NET ON TWITTER- CLICK HERE - @anglersnetPLEASE 'LIKE' US ON FACEBOOK - CLICK HERE Link to post Share on other sites
UK-Fishing-Tackle.co.uk 0 Posted June 10, 2005 Share Posted June 10, 2005 PM me any PHP questions anytime! Cory! Better to be neat where possible. I've worked in very hectic environments though where I've been guilty of not doing it and had plenty shoved my way where people clearly haven't done it!!! A lot of readily available PHP scripts are also badly organised/indented - probably by design though to stop people tampering.... Ian W Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now