Becareful, because statements where you include the array in the query could cause you trouble. For instance:
$query = "update table set data='$array[1]' where data != ''";
mysql_query($query);
This has the unfortunate side effect of only putting $array into the string, without the identifier to the stored value of [1] in the way. Much like $array . "[1]". Which could cause all sorts of issues.
Instead, separate the array variable from the string like this:
$query = "update table set data='" . $array[1] . "' where data != ''";
mysql_query($query);