title: Convert two arrays to associative array - PHP
body: <p>I need to convert some arrays into associative array. I need the values to be saved together.</p>
  
  <pre><code>'days1' =&gt; 
      array (size=5)
        0 =&gt; string '30' (length=2)
        1 =&gt; string '90' (length=2)
        2 =&gt; string '50' (length=2)
        3 =&gt; string '50' (length=2)
        4 =&gt; string '5' (length=1)
    'price1' =&gt; 
      array (size=5)
        0 =&gt; string '5' (length=1)
        1 =&gt; string '10' (length=2)
        2 =&gt; string '12' (length=2)
        3 =&gt; string '13' (length=2)
        4 =&gt; string '1' (length=1)
    'days2' =&gt; 
      array (size=3)
        0 =&gt; string '30' (length=2)
        1 =&gt; string '90' (length=2)
        2 =&gt; string '180' (length=3)
    'price2' =&gt; 
      array (size=3)
        0 =&gt; string '6' (length=1)
        1 =&gt; string '7' (length=1)
        2 =&gt; string '10' (length=2)
  </code></pre>
  
  <p>So days1 needs to merge with price1 and create something like this</p>
  
  <pre><code>array(
   30 =&gt; 5,
   90 =&gt;10,
   50 =&gt; 12,
   50 =&gt; 13,
   5 =&gt; 1
  )
  </code></pre>