Skip to content

Instantly share code, notes, and snippets.

@LinzardMac
Created April 1, 2013 15:51
Show Gist options
  • Save LinzardMac/5285723 to your computer and use it in GitHub Desktop.
Save LinzardMac/5285723 to your computer and use it in GitHub Desktop.
$pattern = "/height=\"[0-9]*\"/";
$string = preg_replace($pattern, "height='auto'", $rs['url']);
$pattern = "/width=\"[0-9]*\"/";
$string = preg_replace($pattern, "width='auto'", $string);
echo $string;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment