Adding a link button for each query result

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

almost.
echo '<img src="$row['Anime_id'].jpg" /> ';
puts <img src="$row['Anime_id'].jpg" /> to the output-stream.
Variable substitution only takes place in double-quoted literals, e.g.

Code: Select all

echo "<img src="$row[Anime_id].jpg" /> ";
if you want to keep the single-quoted literals try

Code: Select all

echo '<img src="', $row['Anime_id'], '.jpg" /> ';
see: http://www.php.net/manual/en/language.t ... ing.syntax
Post Reply