English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

What are the advantages of creating a website with Php or Html. The Difference between the two. The disadvantages?

2006-12-30 14:06:16 · 3 answers · asked by slimshady22248202 1 in Computers & Internet Programming & Design

3 answers

HTML is what web pages are made with.

PHP is programming that is embedded within an HTML document (or sometimes it is all PHP) that is processed before the web page is sent to your browser. This extra processing is responsible to add extra html code depending on certain variables. For example, you may have noticed some web sites greet you by name or account name. Tools such as PHP make this possible.

If you want to use dynamic data, such as showing the weather forecast on your home page, then PHP is one way to do that, but it is not the only available tool.

PHP and ASP work much the same way and is a matter of preference. PHP is a "C" syntax while ASP is essentially Visual Basic Script. While it doesn't take programming knowledge to get involved with PHP, it makes it a heck of a lot easier to do advanced stuff.

2006-12-30 14:16:55 · answer #1 · answered by soulblazer28 2 · 1 0

PHP is similar in style to program languages such as C/C++/Java in the sense of conditions (if/else), loops (while/for), and code segregation (by use of curley brackets { } ). I personally feel it is a great language to start off if you've had at least a little programming experience. Visual Basic (classic ASP) is even better for beginners in that the style is a lot more like a natural language.

ex:
if myVariable = 12 then
' do something
end if

As others have said, HTML is the raw, 'finished product' of the webpage whereas PHP generates the code using conditions, loops, and even pulling from a database, XML file, or any other data source.

One good advantage is that PHP has a lot of support for it and is commonly used. Numerous databases support it (such as if you want to store blog items or user data). There are thousands of forums out there that offer support and lots of 'add-ons' for PHP that do some really cool stuff.

another example:

echo "";
for ($i = 0; $i < 4; $i++)
echo "Number: " . $i . "
";
?>



...outputs...



Number: 0

Number: 1

Number: 2

Number: 3


2006-12-30 22:53:52 · answer #2 · answered by Ryan P 1 · 0 0

HTML is mainly for STATIC CONTENT, and requires you to manually edit the file. Not Recommended for Web 2.0 ( Blogs etc. ).

PHP is for DYNAMIC CONTENT, like a Content Management system, blogs, web 2.0. HTML is like Web 1.0

Hope this helps!

2006-12-30 22:08:11 · answer #3 · answered by Chris T 2 · 0 0

fedest.com, questions and answers