Php img syntax not rigth?

Hi,

i am trying to upload my image stored the server following this tutorial online, http://php.about.com/od/phpwithmysql/ss/Upload_file_sql_4.htm
they have used a while loop but i’ve used a foreach loop instead.

Essentially, i’m having trouble with the syntax of my img tag when i try to echo out the image:



<?php foreach ($employees as $employee): ?>
    <?php echo "'<img src=C:\\wamp\\www\\images\\' . $employee['photo'] >  ;?>"  <br >
     

 
  <?php endforeach; ?>


I belive it has something to do with my ’ ’ single or " " double quotes, but i n can’t really point my finger to it as i get the following error:

Parse error: parse error, expecting T_STRING' or T_VARIABLE’ or `T_NUM_STRING’ in C:\wamp\www\employeedisplay.html.php on line 15

line 15 is the <?php echo … ?> code.
Can somebody tell me if i need to close somethnig or adjust my quotes pls.

Try:


echo '<img src="http://localhost/images' . $employee['photo'] . '" />';

And note that src attribute of img tag will have http path and you can use relative path from the root.


<?php foreach ($employees as $employee): ?>
   <img src="C:\\wamp\\www\\images\\<?php echo $employee['photo']; ?>"><br >
<?php endforeach; ?>