$row = $table->tr();

if(!($amIAltOrNot = !$amIAltOrNot))
{
    $row->class = "alt";
}


//  Edit: Much better now
$row = $table->tr();

$row->class = ($amIAltOrNot = !$amIAltOrNot) ? "" : "alt";