DEV Community

Irfan Khan
Irfan Khan

Posted on

Php variable and string.

1.PHP VARIABLE
Php variable start with dollar symbol $.

<?php
$var1
?>
Enter fullscreen mode Exit fullscreen mode

2.STRING
Php string start with "",''etc.
Every program end you need add ;.

<?php
$var1 = "Hello World!";
$var_int = 24; //this integer
echo $var1; //output is "Hello World!";
?>
Enter fullscreen mode Exit fullscreen mode

Discussion (0)