Variables declared in header not available in other includes

You need to globalize it before you set the value, so in your header.php

global $myBool;
$myBool = false;

and then in your page.php

global $myBool;
echo $myBool;

just make sure you page.php includes the header.php file either directly or by calling get_header();

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)