title: How to Convert Youtube iframe to amp-youtube tag
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
  
  $content_description = '&lt;p&gt;&lt;iframe width="854" height="480" src="https://www.youtube.com/embed/xcJtL7QggTI" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen&gt;&lt;/iframe&gt; “While I’ve been very fortunate to have strong mentors and supporters throughout my career, on occasions I’ve encountered a challenge in getting recognition for my work and performance in the form of promotion. Early in my career, a female co-worker and I were in senior manager roles and doing director-level work, but weren’t getting promotions. When we asked the CMO, who was a man, why we weren’t being promoted, he said we were both too young to be directors. At that point, we were already managing teams of five to six people and responsible for driving significant portions of the business, while many directors had smaller teams and fewer responsibilities than us. I started looking for other opportunities outside the company, and when a female VP and colleague heard I was about to leave the company, she offered me a position on her team as director, product management. This gave me a new experience and the director title I had earned. But it’s not just about the title – it’s about being recognized for the business results I was driving and the level of contributions I could bring to any team.&lt;/p&gt;
  &lt;p&gt;&lt;iframe width="854" height="480" src="https://www.youtube.com/embed/TxbE79-1OSI" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen&gt;&lt;/iframe&gt;“In the past, I have had assumptions made about the extent of knowledge and expertise I might possess in the space, and this bleeds through to the amount of weight given to my ideas and opinions. You will always encounter initial biases based off of your gender, ethnicity, and perceived identity – but you just have to stick to your guns and remain confident in your voice. The people who talk the loudest aren’t necessarily the smartest in the room. I’ve found the best way to win over those critical of you is to just take action, measure results, and show that you can think analytically and creatively outside the norm of what has already been done.”&lt;/p&gt;';
  
  ?&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I need to convert all the iframes into AMP format so it will look like.</p>
  
  <pre><code>&lt;amp-youtube
      data-videoid="xcJtL7QggTI"
      layout="responsive"
      width="480" height="270"&gt;
  &lt;/amp-youtube&gt;
  </code></pre>
  
  <p>and </p>
  
  <pre><code>&lt;amp-youtube
      data-videoid="TxbE79-1OSI"
      layout="responsive"
      width="480" height="270"&gt;
  &lt;/amp-youtube&gt;
  </code></pre>