title: Ajax Array to PHP issue
body: <p>Im having difficulties when parsing an array using Ajax to PHP to send an email with the values from the array.</p>
  
  <p>Ajax code:</p>
  
  <pre><code>    $(document).ready(function(){
  
              $("#submit-button").click(function(){
  
                  var countryArray = ['Location Zero', 'Location One', 'Location Two'];
  
                  dataString = countryArray; 
                  var jsonString = JSON.stringify(dataString);
  
                  $.ajax({
                          type: "POST",
                          url: "sendmail.php",
                          data: {countries: jsonString},
                          success: function (msg) {
  
                              $("#errors").text("Thank you for getting in touch, we will get back to you!");
  
                          },
                          error: function (msg) {
                              $("#errors").text("Error sending email, please try again.");
  
                              alert("error");
                          }
                      });
  
  
  });
  
  });
  </code></pre>
  
  <p>PHP code:</p>
  
  <pre><code>&lt;?php
  
  
          $to = "abc@abc.com";
          $countries = json_decode($_POST['countries']);
  
          $header = "Content-Type: text/html\r\nReply-To: \r\nFrom:  &lt;&gt;";
          $subject = "Email from the Lister customer";
  
          $body = @"$countries";
  
  
          if(mail($to, $subject, $body, $header)) {
              die("true");    
          } else {
              die("There was an error sending the email.");   
          }
  
  
  ?&gt;
  </code></pre>
  
  <p>But all I'm getting with in the email from <code>$countries</code> is word "Array" instead of the values.</p>
  
  <p>Can anyone help please?</p>