How to insert multiple image file in a row on my database
<p><a href="https://i.stack.imgur.com/MKshm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MKshm.png" alt="enter image description here"></a>        </p>

<pre><code>if(count($_FILES['upload']['name']) &gt; 0){ 

    //Loop through each file 
    for($i=0; $i&lt;count($_FILES['upload']['name']); $i++) { 

        //Get the temp file path 
        $tmpFilePath = $_FILES['upload']['tmp_name'][$i]; 

        //Make sure we have a filepath 
        if($tmpFilePath != ""){ 

            //save the filename 
            $shortname = $_FILES['upload']['name'][$i]; 

            //save the url and the file 
            $filePath = "../img/slider/" .$_FILES['upload']['name'][$i]; 

            //Upload the file into the temp dir             
            if(move_uploaded_file($tmpFilePath, $filePath)) { $files[] = $shortname; 


            } 
        } 
    } 
}

if(is_array($files)){ 

    foreach($files as $file){


        $file1 = "img/slider/" . $file; 
        $query = "INSERT INTO image(image_path,p_number)VALUES('$file1','$number')";
        $result3 = $db-&gt;insert($query);
    } 
}
</code></pre>

<p>How can I add implode? to store in my database as a 1 record only. because this is generating record each of file my file upload.</p>

<p><a href="https://i.stack.imgur.com/9EDP4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9EDP4.png" alt="enter image description here"></a></p>

<p>the first image is my current database look like. and the second is my goal. how can I do that?</p>