title: How to remove link image with javascript?
body: <p>I have one textarea and I want to past the image link into text area then click submit to remove link from image.</p>
  
  <p>This is what I have tried -</p>
  
  <pre><code>&lt;?php if (isset($_GET['ids'])) {
      $array = explode("&lt;a href=", $_GET['ids']);
  print_r($array[0]); // piece1
  print_r($array[1]);
  print_r($array[2]);
  print_r($array[3]);
  print_r($array[4]);
  
  }
  
  ?&gt;
  
  &lt;form method="get" action=""&gt;
      &lt;textarea style="width:50%; height:400px;" name="ids"&gt;&lt;/textarea&gt;&lt;br /&gt;
      &lt;button type="submit"&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>This link will past in text area </p>
  
  <pre><code>&lt;a href="https://1.bp.blogspot.com/-6W0AHlmD4Bo/WcjgQ5CK2nI/AAAAAAAADw0/OUYgbTg8CJM2saIrbkARgqBmn0aviDiWACLcBGAs/s1600/CIMG3395.jpg" imageanchor="1" &gt;&lt;img border="0" src="https://1.bp.blogspot.com/-6W0AHlmD4Bo/WcjgQ5CK2nI/AAAAAAAADw0/OUYgbTg8CJM2saIrbkARgqBmn0aviDiWACLcBGAs/s1600/CIMG3395.jpg" data-original-width="1024" data-original-height="768" /&gt;&lt;/a&gt;
  </code></pre>
  
  <p>And result I want after clicking submit button display html code below , please help me I don't know how to start writing code.</p>
  
  <pre><code>&lt;img border="0" src="https://1.bp.blogspot.com/-6W0AHlmD4Bo/WcjgQ5CK2nI/AAAAAAAADw0/OUYgbTg8CJM2saIrbkARgqBmn0aviDiWACLcBGAs/s1600/CIMG3395.jpg" data-original-width="1024" data-original-height="768" /&gt;
  </code></pre>
  
  <p>This is what I have tried:</p>
  
  <pre><code>&lt;?php if (isset($_GET['ids'])) { 
    $array = explode("&lt;a href=", $_GET['ids']); 
    print_r($array[0]);  
    //piece1 
    print_r($array[1]); 
    print_r($array[2]);
    print_r($array[3]);
    print_r($array[4]); } 
  ?&gt;
    &lt;form method="get" action=""&gt;
      &lt;textarea style="width:50%; height:400px;" name="ids"&gt;&lt;/textarea&gt;
      &lt;br /&gt;
      &lt;button type="submit"&gt;Submit&lt;/button&gt;
    &lt;/form&gt;
  </code></pre>