Echo variables : Echo « Development « PHP






Echo variables


<?
$var1 = 'PHP';          
$var2 = 5;              
$var3 = $var2 + 1;      
$var2 = $var1;          
echo($var1);            
echo($var2);            
echo($var3);            
echo($var1 . ' rules!');
echo("$var1 rules!");   
echo('$var1 rules!');   
?>
           
       








Related examples in the same category

1.Echo multiline string
2.Echoing a String
3.Use Echo command to output HTML string
4.Use Echo to output string
5.Escape the inner quotation marks by placing a backslash before each one
6.Use echo command to output HTML