Declare string variable in php programming language

How to initialize string data type variable inside php script.

String variable are used to hold group of multiple character inside it. For examples N is a single character but Name is multiple character group so here Name is string and only String variable can hold Name inside it. Php gives us the facility to easily declare string variable without use of String data type writing, so here is the complete step by step tutorial for How to Declare string variable in php programming language.

android-project-download-code-button

Note : Php supports $ symbol compulsory to declare variables so declare any variable with $. Without $ symbol web developer cannot make variables in php.

How to Declare string variable in php programming language.

Note : Assign value to sting variable inside Double cot( ” “ ) .

Code for two.php file.

 <?php

//Declaring string variable and giving value to it.
$abc = "Android-Examples.com";

//Printing string variable to screen.
echo $abc;

?>

Screenshot:

Declare string variable in php programming language

Click here to download Declare string variable in php programming language project source code.

Leave a Reply

Your email address will not be published. Required fields are marked *