title: how to return a single element in a php array using angluarjs
body: <p>Here is my code</p>
  
  <pre><code>if($_SERVER["REQUEST_METHOD"] == "POST")
  {
  $customer_array = array();
  
  $customer1 = array(
    'customer_id' =&gt; '1',
    'name' =&gt; 'Larry',
    'city' =&gt; 'Houston'
  );
  $customer_array[] = $customer1;
  
  $customer2 = array(
    'customer_id' =&gt; '2',
    'name' =&gt; 'tom',
    'city' =&gt; 'Hoff'
  );
  $customer_array[] = $customer2;
  
  echo json_encode($customer_array);
  }
  </code></pre>
  
  <p>and this is the Angular part</p>
  
  <pre><code>var app = angular.module('myApp', []);
  app.controller('customersCtrl', function($scope, $http) {
    $http.post("customers.php").then(function (response) {
        $scope.myData = response.data
    });
  });
  </code></pre>
  
  <p>How would I modify my controller to pull both customer1 and customer2 arrays or either customer1 and customer2?  So, in short both arrays or only one.  </p>