I have some code that was written by me some time ago, anyway I dug it out to use and I am getting the following error.
Below is the code that sits around line 353.
$db->Connect('localhost', '*****', '*****', '******');
foreach($data) {
$db->Query("INSERT INTO main (company_name, web_address, address, telephone) VALUES ('".$data['name']."', '".$data['url']."', '".$data['address']."', '".$data['phone']."')");
} echo "DONE";
Line 353 relates to Foreach, Any advice or suggestions would be much appreciated.
Your
foreachstatement is incomplete, you need something like:Where
$datasetis the 2 dimensional array that contains all record sets your want to insert in the database.