title: How do I embed a .wav file in a php if statment?
body: <p>I am a noob to php and coding in general so pardon my ignorance.
  I am trying to play a wav file from a php if statement. When I echo html for the sound I get this error.</p>
  
  <p>PHP Parse error:  syntax error, unexpected '" type="' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ';' in /var/www/html/colums.php on line 67</p>
  
  <p>line 67 being</p>
  
  <pre><code>        echo "&lt;audio autoplay&gt;&lt;source src="sounds/beep.wav" type="audio/wav" 
          autoplay&gt;&lt;/audio&gt;";
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>    &lt;?php
      $result = $db-&gt;query("SELECT * FROM my_table WHERE sound=1");
      while($row = $result-&gt;fetch_assoc()){
      echo $row['sound'];
      }
      $sound=$row['sound'];
      if ($sound = "1"){
              echo "&lt;audio autoplay&gt;&lt;source src="/sounds/beep.wav" 
      type="audio/wav" autoplay&gt;&lt;/audio&gt;";
  
      }
      ?&gt;
  </code></pre>
  
  <p>Thanks for your help</p>