setting variable in header.php but not seen in footer.php

Posted by Naughty.Coder on Stack Overflow See other posts from Stack Overflow or by Naughty.Coder
Published on 2010-03-12T17:54:00Z Indexed on 2010/03/12 17:57 UTC
Read the original article Hit count: 562

Filed under:

in wordpress , i set a variable in header.php

<?php
$var= 'anything'
?>

but in footer.php when I echo it

<?php
echo $var;
?>

I got no thing printed ... why !>

© Stack Overflow or respective owner

Related posts about Wordpress