PHP Variables

PHP Variables






How to Create PHP Variables ?

Answer - 

Here, we start a variable with $ sign and variable name.

<!DOCTYPE html>

<html>

<body>

<?php
$txt = "Hello Morton!";
$x = 25;
$y = 50;

echo $txt;
echo "<br>";
echo $x;
echo "<br>";
echo $y;
?>

</body>

</html>



Output


Hello Morton!

25

50


PHP Variables

Next Post Previous Post