I'm going to assume this is a single dimensional array.
lets say you have the following values in an array: data1, data2, data3
Here's a code snippet of how I would handle the array and store them into MySQL:
<?php
//database connect string to be used later
$dbhost = "localhost";
$dbname = "database_name";
$dbuser = "username";
$dbpass = "password";
$connect = mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db($dbname, $connect);
$a=array("data1","data2","data3")
//You can use foreach to separate the data elements.
foreach ($a as $value) {
//now data element is contained within the variable $value
//at this point you could echo $value to screen or insert into
//database, I'll do both.
//record insert into database
$sql="INSERT into TABLE values ('$value')";
$res=mysql_query($sql);
// output $value to screen
echo $value."\n";
//loop through the array until all values have been accounted for
}
?>