Yes, true, that could have been a solution but i'm pretty sure it wouldn't validate.
But I discovered that the empty value in the passed parameters of the function was the ID, which was exactly what i needed!
Example: `<?php printAllNewsCategories("All news",TRUE,"expandNews","menu-active");` will output an unordered list with the following opening tag `<ul id="expandNews" class="menu-active">`
(which in my case allows me to apply a bit of jquery that writes a class to the specified `<ul>` contextually, according to what ID I have specified, which sets my menu to expand or not).