PHP & MySQL: fetch images from database

后端 未结 8 896
夕颜
夕颜 2021-02-08 13:06

I have uploaded multiple images and path of all the images have been stored together.

Using explode I have separated them and now I wish to echo them in a c

8条回答
  •  终归单人心
    2021-02-08 13:45

    If you see only one image it means that your explode contains an array with only one item. For test replace
    $array = explode("*", $str); with $array = explode("*", "iamge1.png*iamge2.png"); and you should see two images.

    Code:

    ";
        /* Indicators */
        echo"";
    
        $sql = "SELECT * FROM register_office WHERE id='".$idd."'";
            $result = mysqli_query($con, $sql);
            if (mysqli_num_rows($result) > 0) 
            {
                /* Wrapper for slides*/
                echo "";
                                }
                    /*Controls*/
                    echo"";
                    echo "";
                    echo "";
                    echo "";
                    echo "";
                    echo "";
                    echo "";
            }
    ?>
    

提交回复
热议问题