Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php insert array into mysql table

$matstring=implode("','",$matrix[1]);
mysql_query('INSERT INTO Australia (Price, Company, Days, Weight) VALUES ('$matstring')');
Comment

php insert array into mysql

if(is_array($records)){
    foreach ($records as $row) {
        $fieldVal1 = mysqli_real_escape_string($conn, $row[0]);
        $fieldVal2 = mysqli_real_escape_string($conn, $row[1]);
        $fieldVal3 = mysqli_real_escape_string($conn, $row[2]);
 
        $query ="INSERT INTO programming_lang (field1, field2, field3) VALUES ( '". $fieldVal1."','".$fieldVal2."','".$fieldVal3."' )";
        mysqli_query($conn, $query);
    }
}
Comment

PREVIOUS NEXT
Code Example
Php :: install php 7.1 on ubuntu 18.04 
Php :: laravel signed Route custom domain 
Php :: stripslashes 
Php :: php cookies 
Php :: today date to ago for the date in php 
Php :: add-basic-controller-imports 
Php :: laravel update email unique 
Php :: Genrate Random number in php 
Php :: Encrypt in PHP openssl and decrypt in javascript CryptoJS 
Php :: storepublicly laravel 
Php :: checkbox options wordpress 
Php :: laravel get data in pivot table 
Php :: convert multdimentional array in array in php 
Php :: php define class 
Php :: give @s potion off weekness 
Php :: laravel blade global variable 
Php :: Add Text Before the Product Title 
Php :: php date list 
Php :: laravel intersect 
Php :: custom timestamp column laravel 
Php :: laravel validation string type 
Php :: $_get and $_post in php 
Php :: php foreach loop 
Php :: laravel notification attach file 
Php :: laravel factory in custom namespace 
Php :: wordpress get uploads images url 
Php :: popular cms 
Php :: laravel max length format 
Php :: casts laravel 
Php :: jsondecode php array 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =