Jump to content

Can you see where I'm going wrong here...


cowboysdude

Recommended Posts

I tried to rewrite this but upon enabling it I just get a blank white screen which pretty much means I've written it wrong...

 

Any suggestions/help would be greatly appreciated!

 

$i=0;
if($liststyle == 'vertical'){
$inlinestyle = 'style="display:block;clear:both;margin:10px;';
}
else{
$inlinestyle = 'style="display:block;float:left;clear:none;margin:10px;text-align:center;height=100px;width=100px;"';
}

echo '<div id="blanket" style="display:none;"></div>';
echo '<div id="popUpDiv" style="display:none;">';
echo '$vtitle';
foreach ($videos as $video){
$i++;
echo '<div $inlinestyle>';
$link = '<a href="'. (str_replace("&feature=youtube_gdata","", $video['link'])).'" onclick="popup('popUpDiv')">"'.$video['title'].'::DCC Video Library" </a>';
echo '<div>'.$link.$video['img'].'</a></div>';
}

Link to comment
Share on other sites

You're using single quotes to enclose a string, so any single quotes within the string must be escaped with a backslash so they aren't interpreted as the closing quote for the string.

 

$string = 'You can\'t have that, it\'s Dave\'s property.'; 

 

More: http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.single

Link to comment
Share on other sites

You're using single quotes to enclose a string, so any single quotes within the string must be escaped with a backslash so they aren't interpreted as the closing quote for the string.

 

$string = 'You can\'t have that, it\'s Dave\'s property.'; 

 

More: http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.single

 

Oh that makes perfect sense... Many Thanks!!

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.