0

Hey below I tried to display my image, it may be from the way I referenced in the src. Any ideas hot to fix? Thanks

(I get Parse error: syntax error, unexpected '<' )

                    <td><?php echo <img src='"/images/thumbs/.$row['thumb']."';?></td>

2 Answers2

0

A cleaner method:

<?php $foo = $row['thumb'];?>
<td><?php echo '<img src="/images/thumbs/'.$foo.'"';?></td>
Rob Moll
  • 1,542
  • 2
  • 6
  • 11
0

more ways... just keep attention on " and ' orders

<td><?php echo '<img src="/images/thumbs/'.$row['thumb'].'"';?></td>

you may also use:

<td><?php echo "<img src=\"/images/thumbs/{$row['thumb']}\"";?></td>

hope to be usefull