Thanks, but it didn't work for me, because videos can be in various sizes and code sometimes contains newlines.
But this works, finally figured it out by myself:
Code:
ereg_replace("<object(.*)youtube.com/v/(.*)\"(.*)</object>", '<a href="http://www.youtube.com/watch?v=\\2">click here</a>', $str);
Actually really simple 
Last edited by Mad182; 03-14-2009 at 03:54 AM..
|