SHARE

What is php

PHP is a open source scripting language .It stands for hypertext preprocessor . Hypretext Preprocessor means it is not processed after loading on web browser , but it is processed on web server before loading on web browser .

It is a server-side scripting language designed for web development but also used as a general-purpose programming language.
It is used for embed into HTML language during web development . It is widely used language for web development .

Processing of codes
Processing of  php codes

Alternative of HTML ?

It is not alternative of HTML . It is supporting language of HTML . Hypertext codes are inserted into HTML .

When user write any preprocessor code in HTML webpage then it must be saved as .php format .

How To Run

User can’t run this file directly on web browser just as .html is running . It required web server to run .

It means user needs to install a web server such as Apache , MySQL , IIS server to run PHP on local computer .PHP code is transformed into HTML before the page is loaded, users cannot view its code on webpage .

When PHP code runs on server ,server read this code and return result as simplified html code to web browser .

Syntax

Syntax starts with “< ?php “sign and ends with “?> “sign . Sample code as follows

<?php    <!--code placed here-->  ?>

Example

<!DOCTYPE html>
<html>
<body>
<div>
<?php echo ("This text is displayed using hypertext preprocessor code"); ?>
</div>
</body>
</html>

In this example  code is embedded in html .

<?php echo ("This text is displayed using hypertext preprocessor code"); ?>

This code is processed on web server and send output to web browser and text is displayed “This text is displayed using php code” . echo() function is used to display content.

Difference between HTML and PHP

There is a huge difference between HTML And This language .

  • Basic difference is , PHP runs or processed only on server, so user can’t read the source code ,But HTML code completes readable by the web browser .
  • Second and confusing difference is PHP code is may be a part of HTML page or code inserted in html code . So it is not alternative of HTML language
  • Managing database with PHP is more secure than html ,because database source can’t be tracked easily in it .
  • User can create more dynamic , versatile and easy to handle content using PHP , but with html ,user can’t create easily handy webpages .
SHARE
Previous articleDreamweaver – Uses ,Advantages And Disadvantages
Next articleShortCode – What Is ShortCode In WordPress
Manu Mahajan Born 26 Dec 1980 ,Is a founder of Tectrick and MM Toy World. www.tectrick.org is a free digital helping guide on many usable topics to the readers in various method such as Youtube videos , Articles and social media conversation MM Toy World is manufacturer , wholesaler and online retailer of soft toys, personalized gifts ,toys corporate gifts .