Guest User

Untitled

a guest
Oct 17th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. function resizeEmbedded($subject,$width,$height) {
  2. if(eregi('<',$subject)) { $subject = html_entities_decode($subject); }
  3. $subject = str_replace("'",'"',$subject);
  4. $pattern = "/height=\"[0-9]*\"/";
  5. $subject = preg_replace($pattern, "height='".$height."'", $subject);
  6. $pattern = "/width=\"[0-9]*\"/";
  7. $subject = preg_replace($pattern, "width='".$width."'", $subject);
  8. return $subject;
  9. }
Add Comment
Please, Sign In to add comment