PHP Array into MySQL Rows

Cristin

New Member
I'm trying to take an array and place each item in the array into its own row in my MYSQL table.

Any help?
 

Cristin

New Member
I figured it out.

I'm using

Code:
for ( $i = 0; $i < count($Primary1); $i++){
	$sql = "INSERT INTO Primary VALUES ( '$Primary1[$i]' )";
	mysql_query($sql, $conn) or die(
		'<p>Query error: ' . mysql_error() .  
    		'</p>\n<p>Couldn\'t add Primary Care Physicians</p>' );
}
 
good for you.. and also, it's good that you posted the answer to your question as there might be someone who can benefit from this..
 
Top