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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -