-
I have come up with a solution like this but it fails in one particular video
$u = $paths_youtube;
$m=preg_split('/width=/',$u);
echo $org_w = substr($m[1],0,5);
echo "<br/>";
echo $org_h = substr($m[1],13,5);
$u = str_replace('width='.$org_w, 'width="260"', $u);
$u = str_replace('height='.$org_h, 'height="207"', $u);
echo $u;
-
Here's another dosing of regular expressions.
$youTube = preg_replace('/width="(\d+)"/', '260', $youTube);
$youTube = preg_replace('/height="(\d+)"/', '207', $youTube);
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks