Question: So, I'm writing a menu and I want it to stay a certain color based upon it being on that page.
I've added "class = 'active'" onto the page, and I've tried adding it to CSS, but it's not working. Any ideas?

PHP code: 

```
<?php
$currentPage = basename($_SERVER['REQUEST_URI']);
print "<div id = 'submenu-container'>";
print "<div id = 'submenu'>";
print "<ul class = 'about'>";
print "     <li><a  href='about.php#about_intro.php'if($currentPage=='about.php#about_intro.php' || $currentPage=='about.php') echo 'class='active''>About</a></li>";
print "     <li><a href='about.php#about_team.php'if($currentPage=='about.php#about_team.php') echo 'class='active''>Team</a></li>";
print "     <li><a href='about.php#about_services.php' if($currentPage=='about.php#about_services.php') echo 'class='active'>Services</a></li>";            
print " </ul>";
print "</div>";
print"</div>";
?>

```

CSS: 

```
#submenu ul li a .active {
background:#FFF;    
}

```

Answer: 
I think instead of 

```
$memberDisplayList = '<a href= (...etc)

```

you meant to type

```
$memberDisplayList .= '<a href= (...etc)

```

which would append the new links to your string.

Also you don't seem to be echoing your `$user_pic` and `$memberDisplayList` strings anywhere.
Its because your overwriting the variables on each iteration, you need to hold the data within an array then do another foreach loop where ever you output:

```
<?php 
while($row = mysql_fetch_array($sql)){
    ///////  Mechanism to Display Pic. See if they have uploaded a pic or not  //////////////////////////
    $check_pic = "../../members/{$row['id']}/image01.jpg";
    $default_pic = "../../members/0/image01.jpg";
    if (file_exists($check_pic)) {
        $user_pic = "<img src=\"$check_pic?$cacheBuster\" width=\"80px\" />";
    } else {
        $user_pic = "<img src=\"$default_pic\" width=\"80px\" />";
    }

    $user[] = array('id'=>$row['id'],
                    'firstname'=>$row["firstname"],
                    'lasname'=>$row["lastname"],
                    'user_pic'=>$user_pic,
                    'display_list'=>'<a href="http://www.pathtosite.com/friends_page.php?id='. $row['id'].'">' . $row["firstname"] .' '. $row["lastname"] .'</a><br />');
}
?>

```