title: Angularjs $http.post, passing array to PHP
body: <p>I am using a service to update a DB table.</p>
  
  <pre><code>myApp.factory('createGal', function ($http, $q)
  {
      return {
          createGal: function ()
          {
              var deferred = $q.defer();
              var newGalleryArray = {};
  
              newGalleryArray.galleryName = 'New Image Gallery';
              newGalleryArray.client      = 245;
  
              $http.post('/beta/images/create', {newGalleryArray: newGalleryArray}).success(function(data)
              {
                  console.log(data);
                  deferred.resolve(data);
              });
  
              return deferred.promise;
          }
      };
  });
  </code></pre>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>public function create()
  {
      print_r($_POST);
  }
  </code></pre>
  
  <p>The array is returning empty. Am i passing the array incorrectly?</p>
  
  <p><strong>Chrome Dev</strong>
  <img src="https://i.stack.imgur.com/zRTlN.png" alt="enter image description here"></p>
  
  <p>Thanks</p>