deansaddigh Posted April 17, 2010 Share Posted April 17, 2010 Hi if you go here http://www.languageschoolsuk.com/student_photos.php?page=1 I have the most annoying problem, you can see little "-" that links to the last image and its driving me nuts. please help. code where im printing out images while($row = mysql_fetch_array ($result)) { $imagename = $row ['name']; $image = 'Admin/'.$row['path'] . '/' . $row ['name']; //echo '<img src="'.$image.'"/ >'; //echo'<a href="'.$image.'" rel="lightbox" title="my caption">image </a>'; echo '<a href="'.$image.'" rel="lightbox" class="studentimage"><img src="'.$image.'" width="150" height="150"/>'; } echo '<br />'; Link to comment https://forums.phpfreaks.com/topic/198853-simple-problem-driving-me-crazy/ Share on other sites More sharing options...
litebearer Posted April 17, 2010 Share Posted April 17, 2010 Perhaps try... while($row = mysql_fetch_array ($result)){ $imagename = $row ['name']; $image = 'Admin/'.$row['path'] . '/' . $row ['name']; ?> <a href="<?PHP echo $image; ?>" rel="lightbox" class="studentimage"><img src="<?PHP echo.$image; ?> width="150" height="150"><a/> <?PHP } echo '<br />'; Link to comment https://forums.phpfreaks.com/topic/198853-simple-problem-driving-me-crazy/#findComment-1043776 Share on other sites More sharing options...
SaMike Posted April 17, 2010 Share Posted April 17, 2010 First of all you forgot to close those <a> tags so you wanna close them: while($row = mysql_fetch_array ($result)) { $imagename = $row ['name']; $image = 'Admin/'.$row['path'] . '/' . $row ['name']; //echo '<img src="'.$image.'"/ >'; //echo'<a href="'.$image.'" rel="lightbox" title="my caption">image </a>'; echo '<a href="'.$image.'" rel="lightbox" class="studentimage"><img src="'.$image.'" width="150" height="150"/></a>'; } echo '<br />'; then just find what's printing out the - and remove it and you're done! Link to comment https://forums.phpfreaks.com/topic/198853-simple-problem-driving-me-crazy/#findComment-1043777 Share on other sites More sharing options...
deansaddigh Posted April 17, 2010 Author Share Posted April 17, 2010 Thanks guys Link to comment https://forums.phpfreaks.com/topic/198853-simple-problem-driving-me-crazy/#findComment-1043802 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.