title: what this json must work?
body: <p>hi i search alot for get a respone from php back and if that respone is ok do someting and if its false do something else(!!!!!!!! WHENE I HAVE OTHER OUTPUT FROM THAT PHP !!!!!!)
  this is my index file</p>
  
  <pre><code>&lt;head&gt;
  &lt;script src="jquery-1.7.2.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="js.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p&gt; click &lt;/p&gt;
  &lt;input type="text" id="who"&gt;
  &lt;br&gt;
  &lt;input type="text" id="why"&gt;
  &lt;div id="bg" align="center"&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>this is my JS file</p>
  
  <pre><code>$(document).ready(function(){
      $('p').click(function(){
          var who = $('input#who').val();
          var why = $('input#why').val();     
          $.post('file.php',{who:who,why:why},function(data) {
      if(data.success){
           alert(data.message);
      }
      else{ alert('ERROR:' + data.message);
      }
  });
  
  
  
  
      });
  });
  </code></pre>
  
  <p>and this is my file.php</p>
  
  <pre><code>&lt;?php
  $response = array('success' =&gt; 'true', 
      'code' =&gt; "jQuery('#bg').html('\"Javascript\", \"json\", \"PHP\"');");
  echo json_encode($response);
  ?&gt;
  </code></pre>
  
  <p>my question :
  1- why this is not work i get alert (error:undifined)
  2- how i can get some result from that php file when its have other output 
  like this:</p>
  
  <pre><code>&lt;?php
  echo "1";
  echo "2";
  echo "3";
  and now echo that json
  ?&gt;
  </code></pre>
  
  <p>thanks :(</p>