PHP variables always begin with a dollar sign($).
Use only alphanumeric characters and underscores (a-z0-9) (_) in your variable names. Using a number to start a variable will result in an error.
<?php
$variable = 'value'; // OK
$name = 'Steve'; // OK
$var_1 = 'Variable 1'; // OK
$1_variable = 'value'; // Error
?>
Semicolon Terminates:
A semicolon signifies that the line is terminating. If you forget the semicolon, PHP will treat all of your code as one continuous statement and could result in errors.
Content by: Steve Stewart
Posted a year ago with 949 views
Variable Naming:
PHP variables always begin with a dollar sign($).
Use only alphanumeric characters and underscores (a-z0-9) (_) in your variable names. Using a number to start a variable will result in an error.
Semicolon Terminates:
A semicolon signifies that the line is terminating. If you forget the semicolon, PHP will treat all of your code as one continuous statement and could result in errors.
php String Concatenation:
Use the period (.) to join strings or append variable data into strings.