deansaddigh Posted December 2, 2009 Share Posted December 2, 2009 The reason i ask is everything underneath it appears to be alink as well, tis blimmin annoying <?php echo '<li class="newproducts"><a href="product_details.php?productid='.$productid.'">' .$productname.'</a><br />';?> Link to comment https://forums.phpfreaks.com/topic/183790-is-this-code-correct/ Share on other sites More sharing options...
mrMarcus Posted December 2, 2009 Share Posted December 2, 2009 seems fine. Link to comment https://forums.phpfreaks.com/topic/183790-is-this-code-correct/#findComment-970078 Share on other sites More sharing options...
premiso Posted December 2, 2009 Share Posted December 2, 2009 It could be that you are not closing the <li> tag, try adding a </li> after the </a>, as the li class may be causing the issue. Link to comment https://forums.phpfreaks.com/topic/183790-is-this-code-correct/#findComment-970080 Share on other sites More sharing options...
FaT3oYCG Posted December 2, 2009 Share Posted December 2, 2009 put a space on the right of the semicolon, i also changed that code posted on the other thread in the css section although it probably was php / html. Link to comment https://forums.phpfreaks.com/topic/183790-is-this-code-correct/#findComment-970081 Share on other sites More sharing options...
deansaddigh Posted December 2, 2009 Author Share Posted December 2, 2009 Sorry i posted the wrong bit of code. Basically anything under this line of code becomes a link even my other divs <?php echo '<a href="'.$file.'" target="_blank" rel="lightbox"><img src="'.$file.'" width="100" height="100"/><br />';?> Any idea? Link to comment https://forums.phpfreaks.com/topic/183790-is-this-code-correct/#findComment-970102 Share on other sites More sharing options...
thebadbad Posted December 2, 2009 Share Posted December 2, 2009 Well, isn't it obvious? You're not closing the anchor tag. Link to comment https://forums.phpfreaks.com/topic/183790-is-this-code-correct/#findComment-970105 Share on other sites More sharing options...
deansaddigh Posted December 2, 2009 Author Share Posted December 2, 2009 Thanks so much im such an idiot some times. Cheers Link to comment https://forums.phpfreaks.com/topic/183790-is-this-code-correct/#findComment-970108 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.