You can do this with PHP by altering your code a little. I'll just show you a quick example (I'm not testing this so I'm not positive that it works but something very similar).
Code:
<?php
$links = array();
$links['home'] = "http://www.mysite.com";
$links['page1'] = "http://www.mysite.com/page1.html";
$links['page2'] = "http://www.mysite.com/page2.html";
?>
<div id="wrapper">
<ul>
<?php
foreach ($links as $key=>$link) {
$url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$id = (strtolower($link) == strtolower($url)) ? " id=\"current\"" : "";
echo "<li$id>$key</li>";
}
?>
</ul>
</div>
I'm guessing you had each of these <li>'s link to a page so I included URLs in the array.