title: Bar graph using php and mysql
body: <p>Requirement Bar chart from MySql data , i have working code for static bar chart the code as follows --></p>
  
  <pre><code>&lt;script&gt;
  var data = [    
      [0, 11], //London, UK
      [1, 15], //New York, USA
      [2, 25], //New Delhi, India
      [3, 24], //Taipei, Taiwan
      [4, 13], //Beijing, China
      [5, 18]  //Sydney, AU
  ];
  var dataset = [
      { label: "barchart", data: data, color: "#5482FF" }
  ];
  var ticks = [
      [0, "London"],
      [1, "New Mumbai"],
      [2, "New Delhi"],
      [3, "Taipei"],
      [4, "Beijing"],
      [5, "Sydney"]
  ];
  &lt;script&gt;  
  </code></pre>
  
  <p>but for dynamic bar chart data is coming from database and data is in also array format as follows</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [product] =&gt; abc
              [total] =&gt; 21
          )
      [1] =&gt; Array
          (
              [product] =&gt; xyz
              [total] =&gt; 1
          )
      [2] =&gt; Array
          (
              [product] =&gt; pqr
              [total] =&gt; 13
          )
  )
  </code></pre>
  
  <p>how to create bar chart from this data ? or any suggestion?</p>