Wednesday, 7 January 2015

The $_GET Variable

The predefined $_GET variable is used to collect values in a form with method="get"
Information sent from a form with the GET method is visible to everyone (it will be displayed in the browser's address bar) and has limits on the amount of information to send.

// A Simple program to use GET Variable



The "welcom.php" file can now use the $_GET variable to collect form data (the names of the form fields will automatically be the keys in the $_GET array):











GET Variable

The $_GET Variable

The predefined $_GET variable is used to collect values in a form with method="get"
Information sent from a form with the GET method is visible to everyone (it will be displayed in the browser's address bar) and has limits on the amount of information to send.

// A Simple program to use GET Variable



The "welcom.php" file can now use the $_GET variable to collect form data (the names of the form fields will automatically be the keys in the $_GET array):











This entry was posted in :

Tuesday, 6 January 2015

When a function is completed, all of its variables are normally deleted. 

However, sometimes you want a local variable to not be deleted.

To do this, use the 'static' keyword when you first declare the variable






The Output will be shown as:
123

So,each time the function is called, that variable will still have the information it contained from the last time the function was called.

Static Variable

When a function is completed, all of its variables are normally deleted. 

However, sometimes you want a local variable to not be deleted.

To do this, use the 'static' keyword when you first declare the variable






The Output will be shown as:
123

So,each time the function is called, that variable will still have the information it contained from the last time the function was called.
This entry was posted in :

Monday, 5 January 2015

The concatenation operator (.)  is used to join two string values together.

 The following example show how two string are concatenated.




The result will be shown as :

getcoderesults 

If we need space between two strings then we use two concat operator between two strings






&lt?php

echo "hello friends";

?>

PHP Concatenation Operator

The concatenation operator (.)  is used to join two string values together.

 The following example show how two string are concatenated.




The result will be shown as :

getcoderesults 

If we need space between two strings then we use two concat operator between two strings






&lt?php

echo "hello friends";

?>

This entry was posted in :

Sunday, 4 January 2015

We know the length of a string value in PHP.
 
The strlen() function returns the length of a string, in characters.

The following example show the use of strlen()





The result is shown:
15

strlen() function

We know the length of a string value in PHP.
 
The strlen() function returns the length of a string, in characters.

The following example show the use of strlen()





The result is shown:
15

This entry was posted in :

Saturday, 3 January 2015

The strpos() function is used to search for a character or a specific text within a string.

If a match is found, it will return the character position of the first match. 

If no match is found, it will return nothing.


The following example how to use a strpos():




 The result is come:

24




If the word is not present in the string, then no output will be displayed:



<?php
echo 'hello world';
?>

strpos() function

The strpos() function is used to search for a character or a specific text within a string.

If a match is found, it will return the character position of the first match. 

If no match is found, it will return nothing.


The following example how to use a strpos():




 The result is come:

24




If the word is not present in the string, then no output will be displayed:



<?php
echo 'hello world';
?>
This entry was posted in :

Friday, 2 January 2015

Variables are "containers" for storing information. Variables are represented '$' symbol in the PHP language.

A variable starts with the $ sign, followed by the name of the variable

A variable name must begin with a letter or the underscore character

A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )

A variable name should not contain spaces

Variable names are case sensitive ($y and $Y are two different variables)









The result is =11;


Variable Declaration

Variables are "containers" for storing information. Variables are represented '$' symbol in the PHP language.

A variable starts with the $ sign, followed by the name of the variable

A variable name must begin with a letter or the underscore character

A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )

A variable name should not contain spaces

Variable names are case sensitive ($y and $Y are two different variables)









The result is =11;


This entry was posted in :

Thursday, 1 January 2015

PHP is a server scripting language, and is a powerful tool for making dynamic and interactive Web pages.

PHP stands for PHP: Hypertext Preprocessor.It is a widely-used, open source scripting language.
Its scripts are executed on the server. It is free to download and use.

To start using PHP, we have:
 install a web server
 a web host with PHP and MySQL support.
Install a web server on your own PC, and then install PHP and MySQL

A PHP script can be placed anywhere in the document.
A PHP script starts with <?php and ends with ?>:

<?php
// PHP code goes here

?>

 The default file extension for PHP files is ".php".





Each code line in PHP must end with a semicolon. 
The semicolon is a separator and is used to distinguish one set of instructions from another.

General Introduction

PHP is a server scripting language, and is a powerful tool for making dynamic and interactive Web pages.

PHP stands for PHP: Hypertext Preprocessor.It is a widely-used, open source scripting language.
Its scripts are executed on the server. It is free to download and use.

To start using PHP, we have:
 install a web server
 a web host with PHP and MySQL support.
Install a web server on your own PC, and then install PHP and MySQL

A PHP script can be placed anywhere in the document.
A PHP script starts with <?php and ends with ?>:

<?php
// PHP code goes here

?>

 The default file extension for PHP files is ".php".





Each code line in PHP must end with a semicolon. 
The semicolon is a separator and is used to distinguish one set of instructions from another.

This entry was posted in :
PHP is a server scripting language, and is a powerful tool for making dynamic and interactive Web pages.

PHP stands for PHP: Hypertext Preprocessor

PHP is a widely-used, open source scripting language

PHP scripts are executed on the server

PHP is free to download and use.

PHP is a server scripting language, and a powerful tool for making dynamic and interactive 

Web pages.

PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.

Introduction

PHP is a server scripting language, and is a powerful tool for making dynamic and interactive Web pages.

PHP stands for PHP: Hypertext Preprocessor

PHP is a widely-used, open source scripting language

PHP scripts are executed on the server

PHP is free to download and use.

PHP is a server scripting language, and a powerful tool for making dynamic and interactive 

Web pages.

PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.
This entry was posted in :