title: Return in php is not showing data, but echo is
body: <p>i am a complete newbie with angularjs, i am using $http to send to the server and the php file is very basic. i can get the http retrieving data from an echo. But from i am trying to get the data using return. Any ideas?</p>
  
  <pre><code>$scope.SendData = function () {
          // use $.param jQuery function to serialize data from JSON
          var data = $.param({
              action: "get_clients"
          });
  
          var config = {
              headers : {
                  'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8;'
              }
          }
  
          $http.post('http://********.co.uk/*******/switchboard.php', data, config)
              .success(function (data, status, headers, config) {
                  $scope.PostDataResponse = data;
                  console.log($scope.PostDataResponse);
              })
              .error(function (data, status, header, config) {
                  $scope.ResponseDetails = "Data: " + data +
                      "&lt;hr /&gt;status: " + status +
                      "&lt;hr /&gt;headers: " + header +
                      "&lt;hr /&gt;config: " + config;
                  console.log($scope.ResponseDetails);
              });
      };
  </code></pre>
  
  <p>the php file is very simple and is just an echo or a return.</p>
  
  <pre><code>&lt;?php
  echo "i am from the php file";
   ?&gt;
  
  &lt;?php
  return "i am from the php file";
   ?&gt;
  </code></pre>