White_Lily Posted September 25, 2012 Share Posted September 25, 2012 Hi i have a slight problem, in my if and else statement that checks whether or not there is an image in the database when there is an image, there is a href tag that wraps around image the image so that once the image is clicked it then does a lightbox effect. the problem im having is that when there IS an image, the href tag is NOT wrapping around the image. <?php if(!$res["image"]){ echo 'No Image'; }else{ echo '<a href="'.$res["image"].'" rel="lightbox">'.displayImage($res["image"], $res["name"], NULL, 150, 150).'</a>'; } ?> Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 25, 2012 Share Posted September 25, 2012 Post DisplayImage. It needs to return a string, not echo. Quote Link to comment Share on other sites More sharing options...
White_Lily Posted September 25, 2012 Author Share Posted September 25, 2012 Okay thank you, is there a "solved" button on this new design? O.o Quote Link to comment Share on other sites More sharing options...
DavidAM Posted September 25, 2012 Share Posted September 25, 2012 Okay thank you, is there a "solved" button on this new design? O.o It is at the very top of the topic. Quote Link to comment 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.