Jump to content

current page class change


shortysbest

Recommended Posts

I had this script to change the class of the current page, but now i have used mod_rewrite to change the url and it doesnt work and im not exactly sure what modifications to make to it.

 

my url before would be

 

www.mysite.com/sw.php?node=home

 

but now it is

 

www.mysite.com/node/home

 

<?php
$current_file = basename(__FILE__);
$key = NULL;
$value = NULL;
$get_string = '';
$start = TRUE;
foreach ($_GET as $key => $value) {
    if ($start) {
        $get_string .= '?';
        $start = FALSE;
    }
    else
        $get_string .= '&';
    $get_string .= $key.'='.$value;
}
$current_page = $current_file.$get_string;
?>

 

Any help on this would be greatly appreciated

Link to comment
https://forums.phpfreaks.com/topic/200857-current-page-class-change/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.