title: Get a single data using PDO and store in a variable
body: <p>I have this php script to update data. I need to store result from a query using SUM. I have the code below.</p>
  
  <pre><code>$query=$DBcon-&gt;prepare("SELECT SUM(fee) FROM users WHERE list_no=:list_no");
  $query-&gt;bindParam(':list_no', $sp_no);
  $query-&gt;execute();
  $result = $query -&gt; fetch();
  echo $result["figure"];
  </code></pre>
  
  <p>It displays ARRAY...</p>