无法将数组导入数据库

I have an array like this:

Array ( [0] => 123123123 [1] => Ognjen  [2] => Babic ) 
Array ( [0] => 23423423  [1] => Neven   [2] => Babic ) 
Array ( [0] => 235646345 [1] => Vanja   [2] => Babic ) 
Array ( [0] => 4853424   [1] => Nikola  [2] => Babic ) 
Array ( [0] => 34545747  [1] => Viktor  [2] => Sovilj )

And I really don't know how to import it into mysql database without using prepared statements, because I have a strict order not to use it. The main thing that confuses me is that I have never worked with this kinds of arrays before. Please help

If you don't like to use prepared statements, try generating insert statements with the values in array and execute them one by one or in a batch

$upsert_query_str = "";
foreach($masterArray as $innerArray):
  //construct the update/insert query and append it to the string
  $upsert_query_str.="$$$$$$$$$$$$$";
endforeach;

//Execute the statements

OR

If you like to store all of the data against a specific row, use json_encode() and store it. when fetching it, use json_decode() and you'll have it in your grasp

Hope it helps...

Considering $DataArr is your main array and you've done mysql Connection using mysql_connect($dbHost, $dbUsername, $dbPassword)

$sql = "INSERT INTO table_name (column1, column2, column3) values ";

$valuesArr = array();
foreach($DataArr as $row){

    $column1 = $row[0];    // values 123123123, 23423423, 235646345, etc
    $column2 = $row[1];    // values Ognjen, Neven, Vanja, etc
    $column3 = $row[2]     // values Babic, Sovilj, etc..

    $valuesArr[] = "('$column1', '$column2', '$column3')";
}

$sql .= implode(',', $valuesArr);

mysql_query($sql) or exit(mysql_error()); `