title: echo html and php giving syntax error
body: <p>There are similar questions on StackOverflow but I'm still having trouble fixing my problem. This is what I have</p>
  
  <pre><code>&lt;video class="video-js vjs-default-skin" width="100%" poster="sqqsdqd.jpg" data-setup='{"controls":true, "autoplay": true, "preload": "auto"}'&gt;&lt;source src="$media['data']['videos']['standard_resolution']['url']" type="video/mp4" /&gt;&lt;/video&gt;
  </code></pre>
  
  <p>I need to echo it using php but whenever I try I'm getting a syntax error. This code:</p>
  
  <pre><code>echo '&lt;div class="pic"&gt;&lt;img src=" ' . $media['data']['images']['standard_resolution']['url'] . '"&gt;&lt;/div&gt;';
  </code></pre>
  
  <p>is working fine but I can't figure out how to do it for the video one, help is appreciated.
  Thank you.</p>
  
  <p>Edit:
  Sorry my actual code is like this</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php 
  
  if ($media['data']['type'] == 'image') {
    echo '&lt;div class="pic"&gt;&lt;img src=" ' . $media['data']['images']['standard_resolution']['url'] . '"&gt;&lt;/div&gt;';
  } else {
    echo '&lt;video class="video-js vjs-default-skin" width="100%" poster="httjpg" data-setup='{"controls":true, "autoplay": true, "preload": "auto"}'&gt; &lt;source src=" '.$media['data']['videos']['standard_resolution']['url'].'" type="video/mp4" /&gt;&lt;/video&gt;';
  }
  
  ?&gt;</code></pre>
  </div>
  </div>
  </p>