上传文件的名称不能分开

i'm still a beginner in pdo or php so very sorry if this question sounds dumb.

i'm making a code that is able to upload multiple images from one input and it's uploaded to the folder successfully. while in db i only insert the images path and that succeed as well.

now this is where the problem begins... i'm using microtime() as the new name for the uploaded file. no problem with the first image uploaded but starting with the second image, the name is continuing from the name of first image uploaded. this is the file path/name for first image: uploads/14424949591995.jpg and the second image: uploads/14424949591995.jpg14424949592555.jpg

'uploads' is the folder's name btw

as you can see, i can't seem to separate the name to take its supposed name which is uploads/14424949592555.jpg only

this is my html code:

<!DOCTYPE html>
<html>
<head>
</head>

<body>

<h2>Multiple Image Upload Form</h2>
<form enctype="multipart/form-data" action="" method="post">
First Field is Compulsory. Only JPEG,PNG,JPG Type Image Uploaded. Image Size Should Be Less Than 100KB.
<div id="filediv"><input name="file[]" type="file" id="file" multiple="multiple" /></div>

<input type="submit" value="Upload File" name="submit" id="upload" class="upload"/>
</form>
//php is placed here
</body>
</html>

and php:

 <?php
function microtime_name()
        {
        list($usec, $sec) = explode(" ", microtime());
        return ($usec + $sec)*10000;
        }
if (isset($_POST['submit'])) 
{
$j = 0;     // Variable for indexing uploaded image.
$target_path = "uploads/";     // Declaring Path for uploaded images.
if(count($_FILES['file']['name']) > 0)  // to make sure their is items in the $_FILES['upload'] array
{
    for ($i = 0; $i < count($_FILES['file']['name']); $i++)
    {
        // Loop to get individual element from the array
        $validextensions = array("jpeg", "jpg", "png");      // Extensions which are allowed.
        $ext = explode('.', basename($_FILES['file']['name'][$i]));   // Explode file name from dot(.)
        $file_extension = end($ext); // Store extensions in the variable.
        $namePic=microtime_name(); 
        $target_path = $target_path . $namePic . "." . $ext[count($ext) - 1];     // Set the target path with a new name of image.
        $j = $j + 1;      // Increment the number of uploaded images according to the files in array.
        if (in_array($file_extension, $validextensions))
        {
            echo 'image is uploaded';
            //print_r($_FILES['file']['tmp_name']);
            if (move_uploaded_file($_FILES['file']['tmp_name'][$i], $target_path))
            {
                // If file moved to uploads folder.
                echo $j. ').<span id="noerror">Image uploaded successfully!.</span><br/><br/>';
                $image_name=$target_path;
                $query=$conn->prepare("INSERT INTO pic (pic_id, pic_path)
                                VALUES ('', :pic_path)");
                $query->bindParam(':pic_path', $image_name);
                echo $image_name;
                $query->execute();
                //if($stmt)
                    echo 'success!';

            } 
            else 
            {     //  If File Was Not Moved.
                echo $j. ').<span id="error">please try again!.</span><br/><br/>';
            }
        } 
        else 
        {     //   If File Size And File Type Was Incorrect.
            echo $j. ').<span id="error">***Invalid file Size or Type***</span><br/><br/>';
        }
    }
}
}
?>

my prof. said it was something about having no delimiter to act as the separator between the files when i upload them. i tried searching and couldn't find any solution for putting delimiter. please help!