why array values overwrite in names column just yellow imsert?(replace) :             code is here if any one know please let me know.
          i am very thankful to you guys.i want to insert one by one in names 
          table 
 
<?php

    $conn = new mysqli($servername, $username, "", $dbname);
   
    if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
    }
     $value=$_POST['names'];
       $colors = array("red", "green", "blue", "yellow"); 

       foreach ($colors as $value) {
        
          $query ="insert into test(names) values('$value')";
            }
            if ($conn->query($query) === TRUE) {
               echo "New record created successfully";
                 } else {
                   echo "Error: " . $sql . "<br>" . $conn->error;
                    }
                      $conn->close();
             ?>


