title: How to remove the Square Bracket in JSON using PHP
body: <p>Below code is the returned JSON </p>
  
  <pre><code>[{"one":"id","two":"id","three":"id"},{"one":"id","two":"id","three":"id"}]
  </code></pre>
  
  <p>Below code is the desired result of the returned JSON (without the array bracket)</p>
  
  <pre><code>{"one":"id","two":"id","three":"id"},{"one":"id","two":"id","three":"id"}
  </code></pre>
  
  <p>Below code is to convert the array to the JSON format
  </p>
  
  <pre><code>include('connect-db.php'); 
  $result = mysql_query("SELECT * FROM patientvaccinedetail"); 
  $specific = []; 
  while($row = mysql_fetch_array( $result ,MYSQL_ASSOC)) { 
  echo "&lt;tr&gt;"; 
  echo '&lt;td width="100px"&gt;' . $row['id'] . '&lt;/td&gt;'; 
  echo '&lt;td width="200px"&gt;' . $row['patientid'] . '&lt;/td&gt;'; 
  echo '&lt;td width="200px"&gt;' . $row['vaccineid'] . '&lt;/td&gt;'; 
    //**********Convert the array into json******************* 
  
    $specific[] = ["one" =&gt; $row["id"],
                   "two" =&gt; $row["patientid"],
                   "three" =&gt; $row["vaccineid"]];
  
  $result = json_encode($specific,JSON_UNESCAPED_UNICODE);
  
  echo $result;
  echo "&lt;/tr&gt;";
  echo "&lt;/table&gt;";
  ?&gt;
  </code></pre>
  
  
  
  <p>To send the request to the API, iam using Guzzle
  And the format the API require is {xx:xx},{xx:xx}
  without the square bracket, any idea how to remove it using PHP.
  Thanks in advance</p>
  
  <pre><code>     $client = new Client([
      'headers' =&gt; ['Content-Type' =&gt; 'application/json',
                    'Token' =&gt; $token]
                             ]);
  
         $response = $client-&gt;post('http://localhost:91/Religious',
         ['body' =&gt; ***Where the json will be place***]
         );
  </code></pre>