I have two columns, Entry and text_image, in a table. When looping to see all the rows in an array, I can get the results, but I want it to add /images to the rows that have text starting with img. This is to direct the rows that have “img” (meaning the text within the row) to the correct folder. It might need further explanation to illustrate why but I wont get into it.
while($row = mysql_fetch_array( $result3 )) {
echo "<div class=\'entry\'>";
(I want to add an echo "/images" before the rows that start with "img")
echo $row[\'text_image\'];
echo "</div>";
}
Thank you in advance
This will check if the first 3 letters of
$row['text_image']areimgthen set$imagesto/imageselse it will leave it empty. This will update each time within the loop.