title: PHP PDO retrieves duplicate data
body: <p>I have this situation with PHP (PDO);</p>
  
  <p>I'm implementing a method that retrieves data from MySql and does it well, but the problem is that duplicate data recovered as key bone as no value but other data appends more, leave the script and images for more detail;</p>
  
  <p>Data.php</p>
  
  <pre><code>    //read
      public function getData() {
      $statement = $this-&gt;db-&gt;prepare("select Id,Company_Name,Contact_Name,Contact_Title,Address from contact_details LIMIT 3;");
      $statement-&gt;execute();
      if ($statement-&gt;rowCount() &gt; 0) {
          $value = $statement-&gt;fetchAll();
          return $value;
      }
  }
  </code></pre>
  
  <p>variable inspection</p>
  
  <p><img src="https://i.stack.imgur.com/muEVr.jpg" alt="enter image description here"></p>
  
  <p>json duplicate</p>
  
  <p><img src="https://i.stack.imgur.com/WIsjB.png" alt="enter image description here"></p>
  
  <p><strong>expected result</strong></p>
  
  <pre><code>Data: [{"Id":"1","Company_Name":"Romero y tomillo","Contact_Name":"Alejandra                 Camino","Contact_Title":"Accounting Manager","Address":null}
  ,{"Id":"2","Company_Name":"Morgenstern Gesundkost","Contact_Name":"Alexander Feuer","Contact_Title":"Marketing Assistant","Address":"Heerstr. 22"}
  ,{"Id":"3","Company_Name":"Ana Trujillo Emparedados y helados","Contact_Name":"Ana Trujillo","Contact_Title":"Owner","Address":null}]
  </code></pre>