Assign image to PHP variable
I would like to assign an image to a variable in a PHP script so that I
can make the image appear when I want to it to, by declaring the variable.
$FoodList = array_unique($FoodList);
if (!empty($FoodList)) {
foreach ($FoodList as $key => $value) {
echo "<li>" . $value . "<li>"; // The variable would go here, so
that image would appear //next to each variable
}
echo "</ul>";
}
No comments:
Post a Comment