you can't do "menu $active"

$active is meaningless at that level of code

Why would you have the $iif over a regular if statement by the way?