On Jan 15, 2008 6:37 PM, Jochem Maas [EMAIL PROTECTED] wrote:
Daniel Brown schreef:
..
$embed_code =
preg_replace('/height=([0-9]*)/U','height='.$height.'',preg_replace('/width=([0-9]*)/U','width='.$width.'',$embed_code));
I wouldn't have given him the complete regexp - how will they
$stringtoedit = preg_replace(/width=(\?[0-9%]\?[^0-9%\])/msi,
width=\\\1\, $stringtoedit);
$stringtoedit = preg_replace(/height=(\?[0-9%]\?[^0-9%\])/msi,
height=\\\1\, $stringtoedit);
This adds quotes around quote-less values, which were once
acceptable HTML, but aren't really a Good Idea.
It
On Jan 15, 2008 5:25 PM, Rob Gould [EMAIL PROTECTED] wrote:
Can anytime give me some insights on how to write a PHP script that
could accept any of the below strings below and edit the strings to
change their width and height settings dynamically?
For instance, if I want all embedded videos
Daniel Brown schreef:
..
$embed_code =
preg_replace('/height=([0-9]*)/U','height='.$height.'',preg_replace('/width=([0-9]*)/U','width='.$width.'',$embed_code));
I wouldn't have given him the complete regexp - how will they ever learn. :-)
BUT
$embed_code = preg_replace(
4 matches
Mail list logo