ChrisML123 Posted October 14, 2008 Share Posted October 14, 2008 I have made a function, that displays an image and a title in a table. function drawimage($directory, $number, $picturename) //$directory must be in form "image/folder/" { echo '<tr><td><div align="center"><a href="'.$directory.$number.'.JPG" rel="lightbox[group]" title="'.$picturename.'"><img src="'.$directory.'t'.$number.'.JPG" border="0"></a></div></td> <td><div align="left">'.$picturename.'</div></td></tr>)'; } the page that is calling the function has the following text: <table cellpadding="5" cellspacing="0" border="0"> <?php drawimage("image/colour/", 1, "tower"); drawimage("image/colour/", 2, "crazy lights"); drawimage("image/colour/", 3, "a cow"); drawimage("image/colour/", 4, "kettle"); drawimage("image/colour/", 5, "tramway"); drawimage("image/colour/", 6, "snapple"); drawimage("image/colour/", 7, "strasbourg roofs"); drawimage("image/colour/", 8, "swiss woods"); ?> </table> and the images and tables all display fine, except: )))))))) appears just above the images. And i can't work out why! Over to you. you can see it failing in action at http://saltandlightsolutions.com/test/jt/main.php?page=colour Link to comment https://forums.phpfreaks.com/topic/128353-solved-where-on-earth-are-these-coming-from/ Share on other sites More sharing options...
JasonLewis Posted October 14, 2008 Share Posted October 14, 2008 Um, you have a ) at the end of your echo, inside the quotes. So that means it'll be echoing out each time you call it. Link to comment https://forums.phpfreaks.com/topic/128353-solved-where-on-earth-are-these-coming-from/#findComment-664873 Share on other sites More sharing options...
ChrisML123 Posted October 14, 2008 Author Share Posted October 14, 2008 you are sexy Link to comment https://forums.phpfreaks.com/topic/128353-solved-where-on-earth-are-these-coming-from/#findComment-664874 Share on other sites More sharing options...
JasonLewis Posted October 14, 2008 Share Posted October 14, 2008 Right... Should I be scared? I seem to be. Link to comment https://forums.phpfreaks.com/topic/128353-solved-where-on-earth-are-these-coming-from/#findComment-664878 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.