title: echo just json_encode to json from php
body: <p>-I have a soap code to send sms from site in send.php file</p>
  
  <pre><code>$soapClientObj = new SoapClient("http://xxx/Post/Send.asmx?wsdl");
  $parameters['username'] = "xxx";
  $parameters['password'] = "xxx";
  $parameters['to'] = "xxx";
  $parameters['text'] = "xxx";
  print_r($soapClientObj-&gt;SendSms($parameters));
  </code></pre>
  
  <p>-and a <code>.js</code> file that send some data and get some data from index.php file</p>
  
  <p>-and index.php file:</p>
  
  <pre><code>...
  echo json_encode(array('r' =&gt; $numid,'m' =&gt; 'xxx'));
  sndsms($text,array("$mobilenumber")); //function in send.php
  ...
  </code></pre>
  
  <p>now i call index.php, and just want to send below code from index.php</p>
  
  <pre><code>json_encode(array('r' =&gt; '0','m' =&gt; '???')); 
  </code></pre>
  
  <p>but the string that sending every time in <code>json_encode(array('r' =&gt; '0','m' =&gt; '???'));</code>  + return value of <code>print_r($soapClientObj-&gt;SendSms($parameters));</code> in send.php
  how can i send just json_encode?</p>