A
Anonymous
Guest
I am very new to PHP and am having difficultly understanding the scopes for variables.
Is is possible to create a variable at the top of a page in one section of code, than use this variable later in the page in various other sections of code.
For example:
Thanks!
Is is possible to create a variable at the top of a page in one section of code, than use this variable later in the page in various other sections of code.
For example:
Code:
<?php
$var = 0;
//php code
?>
//HTML CODE
<?php
echo $var;
?>
Thanks!