How to initialize char variable inside php script program using single cot.
Character variable is used to hold single characters, for example here A is a single character and all the alphabets individually comes inside character variables. So here is the complete step by step tutorial for Declare character variable in php programming language.
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 character variable in php programming language.
Code for first.php file.
<?php //initialize character variable and giving value to it. $first = 'A'; $second = 'B'; //Displaying char variable on screen echo $first; ?>
Screenshot: