Advertisement
Guest User

Untitled

a guest
Nov 28th, 2011
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. function _image_100p($reg) {
  2.     $img = $reg[1];
  3.     $img = vider_attribut($img, "width");
  4.     $img = vider_attribut($img, "height");
  5.     $img = vider_attribut($img, "style");
  6.    
  7.     $img = inserer_attribut($img, "style", "max-width: 100%; height: auto;");
  8.     return $img;
  9.  
  10. }
  11.  
  12. function image_100p($texte) {
  13.     return preg_replace_callback(",(<img\ [^>]*>),", _image_100p, $texte); 
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement