cirene Posted July 13, 2008 Share Posted July 13, 2008 I am new to PHP. I see alot of talk about XHTML and DHTML. If I write php am I basically writing DHTML? Are they basically the same? How would you describe these languages and how they relate to php? Sorry for stupid questions - I'm new. Quote Link to comment Share on other sites More sharing options...
teynon Posted July 13, 2008 Share Posted July 13, 2008 PHP is used to dynamically generate HTML. DHTML is basically a cooler version of HTML. So PHP doesn't really exist without HTML. Quote Link to comment Share on other sites More sharing options...
JonnyThunder Posted July 13, 2008 Share Posted July 13, 2008 Some people describe PHP as an HTML template engine (the power behind creating dynamic pages in HTML) Quote Link to comment Share on other sites More sharing options...
cirene Posted July 13, 2008 Author Share Posted July 13, 2008 So if I know PHP do I inherently know DHTML because I'm creating certain things "on the fly"? Quote Link to comment Share on other sites More sharing options...
JonnyThunder Posted July 13, 2008 Share Posted July 13, 2008 No. You need to know HTML / DHTML before you can instruct PHP to generate the code. You need to know both. Quote Link to comment Share on other sites More sharing options...
cirene Posted July 13, 2008 Author Share Posted July 13, 2008 I know HTML quite a bit. I know how to have php read data and spit some out "on the fly". Because that portion of HTML is dynamically being generated (by PHP), isn't this official DHTML, or am I missing something? Quote Link to comment Share on other sites More sharing options...
JonnyThunder Posted July 13, 2008 Share Posted July 13, 2008 Im not sure. Im a simpleton, and just call everything I send to a web browser "HTML" (despite the fact I actually use XHTML strict) Quote Link to comment Share on other sites More sharing options...
Wuhtzu Posted July 13, 2008 Share Posted July 13, 2008 This isn't DHTML: <?php echo "<html>"; echo "<head>"; echo "<title>Some title</title>"; echo "</head>"; echo "<body> echo "<p>" . $dynamic_content . "</p>"; echo "</body>"; echo "</html"> ?> DHTML is normally used to describe dynamic content created with HTML, JavaScript, DOM and CSS: http://www.w3schools.com/dhtml/default.asp Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.