How can I retrieve and echo multiple images/videos from 1 post/record without using tables? [closed]

痞子三分冷 提交于 2020-02-16 13:13:09

问题


I will be as specific as possible.

I am retrieving information, text, and multiple images from database using mysqli and php. These are my tables:

TABLE 
    posts(
    post_id INT(15) NOT NULL AUTO_INCREMENT,
    user_id INT(11) NOT NULL,
    post_text VARCHAR(400) NOT NULL,
    post_file VARCHAR(200) NOT NULL,
    PRIMARY KEY(`post_id`),
    KEY `user_id`(`user_id`)
)

TABLE 
    user_images(
    post_id INT(15) NOT NULL AUTO_INCREMENT,
    user_id INT(11) NOT NULL,
    album_id INT(11) NOT NULL,
    image_name VARCHAR(200) NOT NULL,
)

TABLE 
    user_video: same as above but instead of image_name it is video_name.

I have successfully retrieved the information and images and placed into tables. However, I am unable to style the table as I would div, span or even lists. I have retrieved the images and information into the for mentioned, but I an unable to style them as I want and the not all the images, for example, are inside the div or span or div that contains the list.

I want to retrieve them into the following format or another that I can do with css: I want this style, or any I design..

I will also retrieve video formats into them. If you can help with that, great if not, I will figure it out one way or another.

来源:https://stackoverflow.com/questions/60195968/how-can-i-retrieve-and-echo-multiple-images-videos-from-1-post-record-without-us

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!