title: How to return a PHP echo to HTML audio src
body: <p>How would I return the value that's output by my PHP file? I've tried a few different ways like PHP each in the source but I could never get a working return.</p>
  
  <p>PHP</p>
  
  <pre><code>&lt;?php
  
  $f_contents = file("/var/www/html/scripts/songs.index");
  $line = $f_contents[array_rand($f_contents)];
  $data = $line;
  
  /** print the contents of the names array */
  echo($data);
  
  ?&gt;
  </code></pre>
  
  <p>Example of the PHP files return:</p>
  
  <pre><code>/var/www/html/uploads/Music/My_Life_NF_Perception_2017.mp3
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;?php include "radio.php" ?&gt;
  &lt;/head&gt;
  
  &lt;audio controls&gt;
  &lt;source src="&lt;?php echo $data; ?&gt;"  type="audio/mp3"&gt;
  &lt;/audio&gt;&lt;br /&gt;
  &lt;/html&gt;
  </code></pre>