title: How to create an array within Array in php
body: <p>Hi Guys Please help me in creating an array like below </p>
  
  <pre><code>array (
    array ( "5555776741" , "Don0454545" , "Draper" ),
    array ( "5551112239" , "betty777777" , "Smith" ),
    array ( "9999999999", "test", "name")
  )
  </code></pre>
  
  <p>From an array $contacts which prints as below with print_r($contacts) as:</p>
  
  <pre><code>Array
  (
  [0] =&gt; Array
      (
          [phone_mobile] =&gt; +16046799329
          [first_name] =&gt; 
          [last_name] =&gt; test
      )
  
  [1] =&gt; Array
      (
          [phone_mobile] =&gt; 7326751700
          [first_name] =&gt; Ralph
          [last_name] =&gt; OBrien
      )
  
  [2] =&gt; Array
      (
          [phone_mobile] =&gt; 3204937568
          [first_name] =&gt; Chris
          [last_name] =&gt; Barth
      )
  
  )
  </code></pre>
  
  <p>Im trying to achieve from the below code : but the value passed is not assigned from $contact to $record the Print_r($contact) prints empty arrays.</p>
  
  <pre><code>foreach ($contacts as $contact)
  {
      $record =$contact;
  }
  </code></pre>