I want to conditionally add a current class to a list. I have set the value of $index earlier in the script and $issue_number is passed in the URL. My last effort was to escape the equal sign and the html quotes around current (see below). I think this is a syntax problem but I’m out of ideas.
if($index == $issue_number) {
$class='class\\=\\"current\\"';
} else {
$class=null;
echo '<li><a'."$class".' href="newsletter_tmp.php?issue_number='."$issue_number".'">'."$date_issue".'</a></li>';
}