Andrew Y Andrew Y - 4 months ago 14
PHP Question

Image and words with classes won't display (PHP CSS HTML)

Got problem displaying the below picture and words, what am I doing wrong?

echo "<img src="images/<?php echo $row["image"]; ?>" class="img-responsive" /><br />";
echo "<h4 class="text-info"><?php echo $row["name"]; ?></h4>";

Answer Source

AS you are working in php so you have no need to echo <?php echo $row["image"]; ?> in side an echo and you have to consider about single quotes and double quotes
Do like this

echo "<img src='images/".$row["image"]."' class='img-responsive' /><br />";
echo "<h4 class='text-info'>".$row["name"]."</h4>";