insert multi array to database in loop : <p>i have below array</p>

<pre><code>Array
(
  [user_id] =&gt; Array
    (
        [0] =&gt; 1
        [1] =&gt; 1
        [2] =&gt; 1
        [3] =&gt; 1
    )

  [menu_id] =&gt; Array
    (
        [0] =&gt; 1
        [1] =&gt; 1
        [2] =&gt; 1
        [3] =&gt; 1
    )

 [submenu_id] =&gt; Array
    (
        [0] =&gt; 1
        [1] =&gt; 2
        [2] =&gt; 3
        [3] =&gt; 4
    )

  )
</code></pre>

<p>my MySQL Database is like below :</p>

<pre><code>user_id | menu_id | submenu_id
        |         |  
</code></pre>

<p>i want to insert above array to my database like below :</p>

<pre><code>user_id | menu_id | submenu_id
    1   |   1     |  1
    1   |   1     |  2
    1   |   1     |  3
    1   |   1     |  4
</code></pre>

<p>how can i insert data like above ? Thank you.</p>
