AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL
HTML Tutorial

PHP Syntax


<< Previous Page
PHP Install
Next Page >>
PHP Variables
Basic Syntax of PHP language.
A PHP script code is executed on the local server, and the HTML code result is sent back to the browser.
A PHP file contains HTML tags and php code.
A PHP script code can be placed anywhere in your document.
The beginning of the php code is marked with <? Php and the end of the php code sketch with ?>.
The file will be saved with the PHP extension as your_file_name.php, which will tell the server to treat the script as the PHP page. Scripts can be written in any text editor (Notepd or Notepad ++).

Simple PHP code, example - how to create


An example of a simple PHP code, with a PHP script that uses a built-in PHP function as "echo" or "print" to output the text in browser "Hello World!"

Example:
<HTML>
<head>
<title>
Example of HTML code and PHP script</ title>
</ head>
<body>

Example of HTML code and PHP script. <br>
This is the second line of HTML code. <br>
<?php
echo "Hello word!<br />";
Print "Hello word!<br />";
echo "Here we have PHP script <br> and this is the second line of PHP script";
?>
</ body>
</ HTML>

Output of above script in your browser:

Hello word!
Hello word!
Here we have PHP script
and this is the second line of PHP script
Note: The PHP statements end with a semicolon (;).

<< Previous Page
PHP Install
Next Page >>
PHP Variables



PHP Syntax - php tutorial

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


Home
PHP Introduction
PHP Install
PHP Syntax
PHP Variables
PHP Echo and Print
PHP Data Types
PHP String Function
PHP Constants
PHP Operator Types
PHP If Else and Elseif
PHP Switch
PHP While Loops
PHP Loop For Do Foreach
PHP Array
Convert Array to String
PHP Function
PHP GET and POST
PHP Date/Time Functions
PHP Login
PHP Delete Element
PHP eregi_replace()
PHP mysql_query()
PHP Errors to Display
PHP Loop For Do Foreach

PHP forms
PHP Form Example
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.