Answer the question
In order to leave comments, you need to log in
Question for 200 - if you declare a variable in header.php - it will not be called in footer.php?
In general, I declared a variable in header.php, which is included in page.php. In header.php - echo $variable works, in footer.php - no.
Those. Can a variable be declared only within one file? And if you attach files through include - will you see the variables?
Answer the question
In order to leave comments, you need to log in
I think when get_header() is called (or whatever, I don't remember), the code is something like this:
function get_header() {
include "header.php";
}
<?php global $variable; ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question