Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $array = array('menu', 'info', 'help');
- if(preg_match('/('.implode('+|', $array).'+)(?:$|=|&)/', $_SERVER['REQUEST_URI'], $match)) {
- $menu_class = $match[1];
- }
- ?>
- <style>
- .menu .<?=$menu_class?> {
- color: red;
- }
- </style>
- <div class='menu'>
- <a href='#' class='info'>link</a>
- <a href='#' class='menu'>link</a>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement