Friday, January 13, 2012

PHP Variables

A variable is just a name assigned to reference a location in memory where some value is stored , such as text string "Welcome to first PHP Programme" or the integer value 4.

Variables are one of the features that distinguish a programming language like PHP from markup languages such as HTML.All variables in PHP are prefixed with a dollar sign($).

Syntax of declaring PHP Variable

$variable_name = Value;



Basic PHP Syntax

A PHP scripting block always starts with <?php and ends with ?>. A PHP scripting block can be placed anywhere in the document.

Syntax of Basic PHP Syntax


<?php
?>

A PHP file normally contains HTML tags, like an HTML file, and some PHP scripting code.

Basic Example

<html>
<body>

<?php
echo "Welcome to first PHP Programme";
?>

</body>
</html>

Each code line in PHP must end with a semicolon.

Wednesday, January 4, 2012

PHP

* PHP stands for PHP : Hypertext Preprocessor
* PHP is a server-side scripting language, like ASP
* PHP is an open source software
* PHP is free to download and use
* PHP supports many databases like Mysql, Oracle etc.
* PHP scripts are executed on the server