Well the best way to help explain is by giving you first the example http://g4hq.com/rssbasic.php The php code <?php $youtube = "http://s1.ytimg.com/vi/"; $link = "[youtube]"; $youtubex = "/default.jpg"; $linkx = "[/youtube]"; $larry = "http://youtube.com/rss/global/top_viewed_today.rss"; $fp = file_get_contents($larry); $newfp = str_replace($youtube, $link, $fp); $nex = str_replace($youtubex, $linkx, $newfp); $flex = trim($nex,"<img"); echo "$flex"; ?> PHP: Now View the source on that page above .. and the problem is i get this -> I want to remove the <img src=" and possibly the align="right".../> Parts so it would be [youtube]XXXXX[/youtube] How would i go upon doing so? I tried to trim <img src.. and that didnt work -_- I want it so that it is removes <img src="[youtube]lklfIPBK4Zg[/youtube]" align="right" border="0" width="120" height="90" vspace="4" hspace="4" />
I think something may be wrong anyway. The first item is shown as <img src="[youtube]blah[/youtube]"> Here's what the others look like; <img src="http://s3.ytimg.com/vi/jdzCxvbe5Hg[/youtube] If you fix this I can do this easily