title: convert a value from json_decode to a string
body: <p>how do i convert my value from json_decode to string so i can pass in a the string value to check if an email exists here is my code.</p>
  
  <p>my json is in this format:</p>
  
  <pre><code>{email:'test@test.com' }
  </code></pre>
  
  <p>PHP:</p>
  
  <pre><code>$var = json_decode($_REQUEST["email"], true);
  $result = $membership-&gt;CheckEmailAddress($var); // get $var to become a string
  </code></pre>
  
  <p>It looks pretty ugly im just starting php and Im not getting very far aye lol.</p>
  
  <p>jquery:</p>
  
  <pre><code>$('#checkemail').click(function () {
      var json = {
          email: $('#email').val()
      };
      $.post('http://' + location.host + '/buyme/include/getemailaddress.php', {
          'email': 'test@yahoo.co.nz'
      }, function (res) {
          var obj = JSON.parse(res);
          alert(obj.message)
      });
  });
  </code></pre>
  
  <p>also how do I put my json variable in my $.post function cose thats the value I want to put there</p>