variables in php code example
Example 1: php variables
<?php
$string = 'string';
$number = 1;
?>
Example 2: php variables
<?php
/* In PHP, a variable starts with the $ sign,
followed by the name of the variable:
*/
$txt = "Hello world!";
$x = 5;
$y = 10.5;
?>
Example 3: php variable
$name = "Josh"; //$varname = value
Example 4: PHP Variables
<?php
$txt = "Hello world!";
$x = 5;
$y = 10.5;
?>
Example 5: how to make a variable in php
$varName = "Hello, World";