You may want to convert inline styles to a simple CSS class to reference that instead. Itāll make your life easier later on:
.display-none {
display:none;
}
Use like:
<div<?php if ($dbValue == 2) echo " class='display-none';"; ?>>div content</div>
Just a thought. I use to code using inline until I couldnāt anymore. Referencing CSS and their classes will keep things more consistent and easier to maintain IMO.