I have a php header for my site, with a css animation in it, but I don't want to animation to occur on certain pages -
is there anyway this?
so have index.php, pagetwo.php, etc. , in each of these pages php include header:
in header file in part, animation don't want occur on pages. short of making 2 copies of header, 1 animation, , header2.php without it, there way accomplish this?
thanks
you can set variable before include included file check. example:
header.php
<?php if (!empty($animation)): ?> <style> ... </style> <?php endif; ?>
animate.php
$animation = true; include 'header.php';
dont_animate.php
$animation = false; include 'header.php';
Comments
Post a Comment