PHP INSERT INTO - Can I use an array to populate field names?
<p>What I am wondering is how you can use INSERT INTO if you don't know how many fields there will be in advance. My project involves adding columns if required. Therefore my code will look like this:</p>

<pre><code>$query = "INSERT INTO table (could be any amount) VALUES (could be any amount)";
</code></pre>

<p>Is it possible to populate the 'could be any amount' parts from arrays? These could be as follows:</p>

<pre><code>$array1 = (fieldname, fieldname, fieldname);
$array2 = (value, value, value);
</code></pre>

<p>Thanks in advance for any help you can give.</p>
