Jump to content

One line I just am having a ton of problems with...


cowboysdude

Recommended Posts

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!

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.