anantamu.com


PHP String


PHP String is enclosed with single quotes or double quotes, single quotes is used for display static data and double quotes is used for display dynamic data.


<?php  
$firstVariable = "Welcome to PHP";
$secondVariable = 'Welcome to PHP';
echo $firstVariable;
echo $secondVariable;
?>
                    

Result:

Welcome to PHP //echo $firstVariable;

Welcome to PHP //echo $secondVariable;


School