ChayaCooper Posted November 13, 2012 Share Posted November 13, 2012 (edited) I would like to display some of the results of a mysql_fetch_array query as images instead of text, but I’m having trouble getting this to work when there is more than one value in the column (even though it is array). This displays the value as text (regardless of the number of values in the column) <?php echo $row['silhouettes_like']; ?> This replaces the text with an image, but it stops displaying images if there is more than one value in the column. <?php echo "<img src='files/" . $row['silhouettes_like']. ".png'>"; ?> The images names match the values (i.e. turtleneck) The query I’m running is: <?php $result = mysql_query("SELECT * FROM style WHERE style.user_id=$user_id ") or die(mysql_error()); $row = mysql_fetch_array($result ); ?> Edited November 13, 2012 by ChayaCooper Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.