S
S
samorez7772018-04-14 17:54:33
Images
samorez777, 2018-04-14 17:54:33

Displaying a picture from a folder by name, if there is such a name in Mysql. Is it possible?

Pictures are generated randomly and saved with different names to the imagejpeg($jpg_image,"img/$item->title.jpg"); , it is not possible to display a picture on the screen if the title from the database corresponds to the title in the folder, broken pictures are obtained in the loop.

foreach ($products as $item){
echo '<img src="img/$item->title.jpg">';}
    };

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2018-04-15
@dimonchik2013

cut

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question