Php 在字符串中的所有图像之后添加类似Facebook的按钮

Php 在字符串中的所有图像之后添加类似Facebook的按钮,php,facebook,Php,Facebook,我怎样才能添加类似facebook的按钮,毕竟图片是字符串 例如: <p>This is some text. This is some text. This is image: <img src='url'/>. This is some tekst. This is new image: <img src='url'></p> 我想改变一下: <p>This is some text. This is some text. Thi

我怎样才能添加类似facebook的按钮,毕竟图片是字符串

例如:

<p>This is some text. This is some text. This is image: <img src='url'/>. This is some tekst. This is new image: <img src='url'></p>
我想改变一下:

<p>This is some text. This is some text. This is image: <img src='url'/><facebook like buuton>. This is some tekst. This is new image: <img src='url'> <facebook like button></p>
使用jQuery:

JAVASCRIPT


您想要什么?img url?还是窗口的当前url?
$(document).ready(function() {
   $("img").each(function() {  
    $(this).after('<facebook like buuton>');
  });  
});