How do I Insert array into specific table columns
Posted: Sun Jul 12, 2009 1:57 am
Hi,
I had problem with inserting array values into table specific columns.Like
$abc=(asfh,adsf,afdaf);
I want to insert these three elements in a table in a different columns in a single loop..
foreach($content as $value)
{
$insert="INSERT INTO test(username,passowrd) VALUES ('$value')";
mysql_query($insert);
}
I tried above code it is not working...
I had problem with inserting array values into table specific columns.Like
$abc=(asfh,adsf,afdaf);
I want to insert these three elements in a table in a different columns in a single loop..
foreach($content as $value)
{
$insert="INSERT INTO test(username,passowrd) VALUES ('$value')";
mysql_query($insert);
}
I tried above code it is not working...