06.12.2017, 00:17
Quote:
That you don't have to declare the variable in PHP.
It is created when you first use that variable. |
Like for example the code bellow, if $value doesn't exists, you will get a PHP warning/error (depends on server settings), since you didn't declared $text. And i see a lot of people making this mistakes.
PHP код:
if (isset($value)) {
$text = 'Value: ' . $value;
}
echo $text;