PHP / PHP Syntax

Its a script that can be placed anywhere in the html / php document. Its script starts with "":



Example
Write a program to display Welcome Program in php.

Program Output


Welcome to PHP Programming Language!

Explanation
1. Create a folder “a” in “C:\xampp\htdocs\”.
2. Create a file index.php and write the above code.
3. Start the xamp server.
4. Open any browser and type http://localhost/a/ or http://localhost/a/index.php and press enter you will get the output.

NOTE
1. You can write html, PHP, cascading style sheet program in a PHP file or html file.
2. It is used to create dynamic web content, working with files (Create, open, read, write, delete, and close files), can create, send and receive cookies and you do the CRUD operations (Create, Read, Update and delete) on databases and work with the user-access controls and Encrypt and decrypt the data.



Home     Back