Before create first php syntax we have to understand about the php server configuration, The php server configuration can be shows by configuration page.
Configuratin page
Php provides a method that is <?php phpinfo(); ?> , this method creates an html page that contains all the information about your php version that you have installed , how you have configure your php.ini file, what database you have and so many other information .
How php supports databases ?
Php is an open source scripting language and supports almost all popular databases including Mysql, PostgreSQL, Oracle, Sybase, SQLite, and ODBC-compliant databases.
Basic Php Syntax
A basic php script always starts with ” <?php ” and ends with ” ?> ” , between both of these tags all the php code comes and execute at server side and generates html content that will sent back to the client’s browser as the response of it’s request.
<html> <body> <?php php code comes here ?> </body> </html>
Some facts about php
- A php file must have extension .php
- A php file may or may not contains html content.
- Each php code line must ends with semicolon.
- Semicolon separates multiple instructions.
- There are two basic functions to print in php ie. “echo” and “print”
- In short hand we may also replace <?php with <? .
Now you have got all the basics about the php and prepare to learn php , We start with the very basics and later om we will also discuss some advance stuff in php.