GOAL: to reveal audio player only when it's triggered by data present in the database.
The "if statement" below works, but my link, surrounded by the curly brackets ({$row['cmmnt_sng']}
), is lost. This link works fine as an html audio control, minus the curly brackets and conditional. But... the control appears in every listing with or without an audio file linked to it. In the conditional, the link is lost.
Note: the curly brackets are required for code embedded in the conditional. Without them you get this little ditty: Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING).
if (isset($row['cmmnt_sng'])) {
echo "
<audio controls>
<source src='../storedlinks_001/cmmnt_uploads/sng/<?php echo {$row['cmmnt_sng']}; ?>'>
</audio>";
}