marukochan Posted February 26, 2007 Share Posted February 26, 2007 Hi! I could not figure out what is wrong with my code. I just want to make the icon viewer.ico as the link. The code is echo("<td width=10% align=middle><a href='project_details.php?id=".$row["project_id"]."'><img src="images/viewer.ico" border="0"></a>"); The error is Parse error: syntax error, unexpected T_STRING in C:\Program Files\Apache Group\Apache2\htdocs\project paper\mogec26Feb07\project_display.php on line 182 If I change the image with text, the script will run without error. Hope somebody could point out to me what is wrong with the code. TQ Link to comment https://forums.phpfreaks.com/topic/40135-solved-image-as-link/ Share on other sites More sharing options...
vbnullchar Posted February 26, 2007 Share Posted February 26, 2007 try this echo("<td width=10% align=middle><a href='project_details.php?id=".$row["project_id"]."'><img src='images/viewer.ico' border='0'></a>"); Link to comment https://forums.phpfreaks.com/topic/40135-solved-image-as-link/#findComment-194173 Share on other sites More sharing options...
Hooker Posted February 26, 2007 Share Posted February 26, 2007 echo("<td width=10% align=middle><a href='project_details.php?id=".$row["project_id"]."'><img src=\"images/viewer.ico\" border=\"0\"></a>"); Link to comment https://forums.phpfreaks.com/topic/40135-solved-image-as-link/#findComment-194174 Share on other sites More sharing options...
marukochan Posted February 27, 2007 Author Share Posted February 27, 2007 Thank you guys!! Worked like a charm. I guess I have to be very careful with ' & ". Thanks again Link to comment https://forums.phpfreaks.com/topic/40135-solved-image-as-link/#findComment-195068 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.