cowboysdude Posted January 28, 2011 Share Posted January 28, 2011 Honestly I've been staring at this for 3 hours LOL and I just can't get it to work.. A little help please would be so awesome. $link = '<a rel="lightbox[social]" title="DCC Videos" href="echo (str_replace("&feature=youtube_gdata","", $video['link']))">'; To be more precise this is actually the part that's not working... href="echo (str_replace("&feature=youtube_gdata","", $video['link']))">'; That line right there is my problem... whew... thrown myself a little I think... Thank you for the help! Quote Link to comment https://forums.phpfreaks.com/topic/225914-one-line-i-just-am-having-a-ton-of-problems-with/ Share on other sites More sharing options...
l4nc3r Posted January 28, 2011 Share Posted January 28, 2011 $link = '<a rel="lightbox[social]" title="DCC Videos" href="'. (str_replace("&feature=youtube_gdata","", $video['link'])).'">'; Quote Link to comment https://forums.phpfreaks.com/topic/225914-one-line-i-just-am-having-a-ton-of-problems-with/#findComment-1166358 Share on other sites More sharing options...
QuickOldCar Posted January 28, 2011 Share Posted January 28, 2011 Can always break it down and make it easier on yourself <?php $test_link = "http://www.youtube.com/watch?v=LkjE6FMoBwQ&feature=youtube_gdata"; $new_link = str_replace("&feature=youtube_gdata",'',$test_link); echo "<a href='$new_link'>$new_link</a>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/225914-one-line-i-just-am-having-a-ton-of-problems-with/#findComment-1166360 Share on other sites More sharing options...
cowboysdude Posted January 28, 2011 Author Share Posted January 28, 2011 $link = '<a rel="lightbox[social]" title="DCC Videos" href="'. (str_replace("&feature=youtube_gdata","", $video['link'])).'">'; THANK YOU!! I will look at it again when my eyes are rested.. but it worked!!! Thank you very much! Quote Link to comment https://forums.phpfreaks.com/topic/225914-one-line-i-just-am-having-a-ton-of-problems-with/#findComment-1166361 Share on other sites More sharing options...
cowboysdude Posted January 28, 2011 Author Share Posted January 28, 2011 Can always break it down and make it easier on yourself <?php $test_link = "http://www.youtube.com/watch?v=LkjE6FMoBwQ&feature=youtube_gdata"; $new_link = str_replace("&feature=youtube_gdata",'',$test_link); echo "<a href='$new_link'>$new_link</a>"; ?> Thank you too!! That would have also worked I believe!! You guys rock... Quote Link to comment https://forums.phpfreaks.com/topic/225914-one-line-i-just-am-having-a-ton-of-problems-with/#findComment-1166362 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.