I am working on a script and have run into an error in syntax somewhere because certain information isn't showing up on the page. <td valign=\"top\" colspan=\"2\" align=\"center\"><a href=" . $line['photo1'] . "><img src=" . $line['photo1'] . " width=\"150\" height=\"150\"></a> <a href=" . $line['photo2'] . "><img src=" . $line['photo2'] . " width=\"150\" height=\"150\"></a> <a href=" . $line['photo3'] . "><img src=" . $line['photo3'] . " width=\"150\" height=\"150\"></a></td> PHP: In the code above the 3 "photos" are not displaying on the page. I am somewhat new to this and I don't see where the problem is at the moment. EDIT (I most also note that the code above is being used within an "echo" on a php page.) Thank you in advance for your help.
<?php echo <<<html <td valign="top" colspan="2" align="center"><a href="{$line['photo1']}"><img src="{$line['photo1']}" width="150" height="150"></a> <a href="{$line['photo2']}"><img src="{$line['photo2']}" width="150" height="150"></a> <a href="{$line['photo3']}"><img src="{$line['photo3']}" width="150" height="150"></a></td> html; ?> PHP:
Using the code in the previous post this is the html code I get on the page... <td colspan="2" align="center" valign="top"> <a href="house5.jpg"> <img src="house5.jpg" height="150" width="150"> </a> <a href="house2.jpg"> <img src="house2.jpg" height="150" width="150"> </a> <a href="house3.jpg"> <img src="house3.jpg" height="150" width="150"> </a> </td> HTML: What I need is to have the folder name "photos/" to appear in front of the file name for the picture. Whenever I try to stick the folder name into the code I get a syntax error and I need to know how to properly insert the folder name in front of the file name and maintain correct syntax.
<?php echo <<<html <td valign="top" colspan="2" align="center"><a href="photos/{$line['photo1']}"><img src="photos/{$line['photo1']}" width="150" height="150"></a> <a href="photos/{$line['photo2']}"><img src="photos/{$line['photo2']}" width="150" height="150"></a> <a href="photos/{$line['photo3']}"><img src="photos/{$line['photo3']}" width="150" height="150"></a></td> html; ?> PHP:
Using your second post the "photos" added in the code... That seemed to solve the problem.... thank you very much.