<?php

   error_reporting(E_ALL);
   ini_set('display_errors', 1);

   include "pdo_connection.php";

   $rows    = array();
   $lfilter = "LETTERS:";
   $sql     = "SELECT Letter, Count FROM _9a_artist_cs";

   $stmt = $pdo->prepare($sql);
   $stmt->execute();

   while($row = $stmt->fetch()) {
      $row_array["L"] = $row["Letter"];
      $row_array["C"] = $row["Count"];
      array_push($rows, $row_array);
   }

   echo json_encode($rows);

?>