Glenugie Posted December 29, 2008 Share Posted December 29, 2008 I have a MySQL query (Not the problem here) which gives out values. The code is here: 16- while($row = mysql_fetch_array($result)) 17- { 18- echo <IMG SRC='$row['picture']'> . " " . $row['Type'] . " - " . "<B>" . $row['Name']."</b>"; 19- echo "<br />"; 20- } The error it gives is: Parse error: syntax error, unexpected '<' in htdocs\equippane.php on line 18 It is designed to take an image link (which is stored as $row['picture'] and display that, then type and name (The last two display properly) the error only occurs when I enter the part to display an image. I don't know if its an error with my syntax or something else I'm not noticing. Any help would be appreciated in working out what is wrong with it. Thanks ~Glenugie~ Link to comment https://forums.phpfreaks.com/topic/138717-solved-while-loop-img-src-problem/ Share on other sites More sharing options...
redarrow Posted December 29, 2008 Share Posted December 29, 2008 <?php while($row = mysql_fetch_array($result)) { echo "<IMG SRC=".$row['picture']."> . " . $row['Type'] . " - " . "<B>" . $row['Name']." </b>" ; echo "<br />"; } ?> Link to comment https://forums.phpfreaks.com/topic/138717-solved-while-loop-img-src-problem/#findComment-725228 Share on other sites More sharing options...
Glenugie Posted December 29, 2008 Author Share Posted December 29, 2008 Thank You That worked Link to comment https://forums.phpfreaks.com/topic/138717-solved-while-loop-img-src-problem/#findComment-725231 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.