I've got a table (grabbed from another website using php) but now I want to import it's content into my database (instead of just printing out the table).
This is the printout (https://i.sstatic.net/NnbAo.png) from the table using the following code:
<?php
$uitvoer = getTable();
echo "<table">;
foreach ($uitvoer as $row) {
echo "<tr>";
foreach ($row as $col) {
echo "<td>" . $col . "</td>";
}
echo "</tr>";
}
echo"</table>";
?>
And when I try this nothing happens to my database:
<?php
$con = mysqli_connect("mysql1.000webhost.com","a2902119_lowavol","pswd")
$uitvoer = getTable();
foreach ($uitvoer as $row) {
foreach ($row as $col) {
$query += "'" . $col . "', ";
}
$sql="INSERT INTO test (cel1, cel2, cel3, cel4, cel5, cel6, cel7, cel8, cel9) VALUES ($query)";
mysqli_query($con, $sql);
}
?>
I have little to no knowledge about PHP. Thanks for helping me!
VALUESlist.