I've a simple problem but I am a php beginner so I need your help.
I want to put a php echo into a php echo. I know that this is not possible but idk how to solve my problem.
There is a simple html list which shows the subjects only if the assigned value in the db is >0.
<li>
<ul>
<?php if ($record['#1'] > "0") { echo "<li>#1</li>"; }?>
<?php if ($record['#2'] > "0") { echo "<li>#2</li>"; }?>
</ul>
</li>
But I also want to show the whole list only if one of the values is >0 because otherwise the list will be empty. So I need something like this (I know it doesn't work this way):
<?php
if ($record['#1'] > "0" or $record['#2'] > "0") {
echo "
<ul>
<?php if ($record['#1'] > "0") { echo "<li>#1</li>"; }?>
<?php if ($record['#2'] > "0") { echo "<li>#2</li>"; }?>
</ul>
</li>
";
}
?>