1. Home >
  2. Apps >
  3. Groups >

website designing ...PHP or HTML?

Question asked by hackerboy in #PHP on Mar 19, 2011
hackerboy
hackerboy ยท Mar 19, 2011
Rank D3 - MASTER
can someone advice me which of the two i shud use to design website??
plz post links to PHP e books 😔 Posted in: #PHP
Kaustubh Katdare
Kaustubh Katdare ยท Mar 19, 2011
Rank A1 - PRO
The choice entirely depends on the nature of your website. Typically, with only HTML (and CSS) you can only make a static website (static content with images, text, videos and audio). However with PHP, you will have the ability to build totally dynamic websites.
Ankita Katdare
Ankita Katdare ยท Mar 19, 2011
Rank A1 - PRO
@hackerboy: PHP files are just like HTML files, but they can include both HTML and PHP code.

The PHP code is executed) by the Web server when the page is accessed and the resulting output is written as HTML within the Web page. When a user accesses a PHP page, his Web browser only gets sent the HTML code, since the Web server has processed the PHP code in the background.
The .php extension is important, since it tells the Web server that the page may include PHP code. Therefore, it must be run through the server's PHP engine before being sent to a client's Web browser. This allows dynamic content to be generated each time the Web page is loaded, based on the variables included in the PHP code.



For example, PHP pages may load objects such as the current date and time, data from form fields submitted by a user, or information from a database. Still, once the page reaches the user's Web browser, everything is formatted as HTML.

I hope the difference between php and html is clear to you now.
eternalthinker
eternalthinker ยท Mar 20, 2011
Rank C2 - EXPERT
@hackerboy
If you have time to get started with some php basics, it is a better choice. Note that you can always put pure HTML code in a php file.
Where it becomes useful is that you can minimize much of your work using php.

For example, while using HTML, you need to copy paste even the common contents to all individual webpages.
You may be having the same header, footer, and navigation menu for almost all the pages.
Using php, you can put these common codes in a single place and refer to it from all the webpages.

So when you have to add a new item to the navigation menu, you need to edit it only once, in the case of php.
If you're using HTML, you'll need to edit the same code in all the webpages (even when there is 10 or 20 of them!) (Some advanced text editors make this simple, but still, the power of php is great)

So even if you're not planning any dynamic content, php can provide easy and faster development.

You must log-in or sign-up to reply to this post.

Click to Log-In or Sign-Up