'How to set visibility of table row in PHP Office Word TemplateProcessor

I would like to conditionally display table row in predefined Ms Office Word file. The solution I am using currently only allows to manage display of whole block and so on the whole tables according to different combination of displayed data. I find this solution obscure. This is why I need conditionally display table row.

Current solution works with:

$$nameofdesiredkey

the conditionally shown content

nameofdesiredkay$$



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source