Hello all,

I am interested to pass in a category that tells me what page the user was on when signing up for the mailing list, which will help me as an internet marketer to know what they may be interested in; however, the code I'm utilizing now is returning nothing but a blank string.

categoryfinder.php
PHP Code:
<?php
    
class CategoryFinder
    
{
        public function 
getCategory()
        {
            
// Get the current page URL
            
$currentURL $_SERVER['PHP_SELF'];
    
            
// Build the regular expression and the match to array
            
$matchTo = array(
                
'index'     => 'Home Page',
                
'health'    => 'Health',
                
'insurance' => 'Insurance',
                
'general'   => 'General',
                
'dating'    => 'Dating',
                
'education' => 'Education',
                
'legal'     => 'Legal',
                
'startyour' => 'Business Opportunities',
                
'business'  => 'Business Services'
            
);
    
            
$regExp  '/' join('|'array_keys($matchTo)) . '/i';
    
            
// Attempt to match something from the URL
            
if (preg_match($regExp$currentURL$matches)) {
                return 
$matchTo[$matches[0]];
            }
    
            return 
' ';
        }
    }  
?>
I really appreciate the help!