two php field inside html
html, php
Solution
Yes. Once you have assigned a variable and it is in scope you can use it again and again, unless you re-assign it, or unassign it.
Problem
I have the following code: ``` <html> <head> </head> <body> <?php $year=$_POST["year"]; ?> <div id="wrap"> <?php echo "<h3>".$year."</h3>"; ?> </div> </body> </html> ``` You can see that I assign the content of `$_POST` to the variable `$year` in the first PHP code block. Can I use `$year` in the second php code block without directly using the `$_POST` variable again?