i have some data in arrays that i need to loop through and insert each item into a db...
for ($i=0; $i < count($body_array); $i++)
{
$testsql = "INSERT INTO mytable (date, body, href, source) VALUES ('$date_array[$i]', '$body_array[$i]', '$href_array[$i]', '$news_array[$i]')";
$result3 = mysql_query($testsql) or die ('error message goes here');
}
the above code does not work. So my question would be....I guess my logic is wrong, heh..but how do I go about doing this?