iisthesloth Posted August 16, 2007 Share Posted August 16, 2007 Hey guys, this is stumpin me. I'm getting an unexpected T_STRING error. I know it has to do with the quotation marks, well atleast i'm pretty sure it does... for ($row=0; $row < $num_rows; $row++){ print("<div id="imageWrap">\n"); for ($col=0; $col < $photos_per_row; $col++){ if($i < $total_photos){ $thumbnail = $thumbnail_dir.trim($photos[$i]); $thumb_image_size = getimagesize($thumbnail); $image_size = getimagesize(trim($photos[$i])); print("<div class="image"><a href=\"javascript:photo_open('photo_display.php?photo=".trim($photos[$i])."','".$image_size[0]."','".$image_size[1]."');\"><img src=\"".$thumbnail."\" ".$thumb_image_size[3]."></a></div>\n"); } else { print(""); } $i++; } print("</div>\n"); } ?> Link to comment https://forums.phpfreaks.com/topic/65161-print-photo-thumbnails-script-should-an-easy-fix/ Share on other sites More sharing options...
bronzemonkey Posted September 3, 2007 Share Posted September 3, 2007 I don't know much about php, but you need to escape the " characters. So... print("<div id="imageWrap">\n"); becomes print("<div id=\"imageWrap\">\n"); Same thing needs to be done for any " appearing within: print(" "); Link to comment https://forums.phpfreaks.com/topic/65161-print-photo-thumbnails-script-should-an-easy-fix/#findComment-340379 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.