title: How to insert data to php numeric array
body: <p>I am trying to inset data to a numeric array <a href="http://jpgraph.net/features/src/show-example.php?target=new_pie1.php" rel="nofollow">php graph</a>.</p>
  
  <p>I tried to do it this way:</p>
  
  <pre><code>    $query = "select id,sales from riders";
  
      $results = mysql_query($query);
  
      while($row = mysql_fetch_array($results)) {
          //$rider[i]=$row['id'];
           $rider[$counter]=$row['sales'];
          $counter++;
      }
  </code></pre>
  
  <p>and insert into data array as follows:</p>
  
  <pre><code>$data = array($rider[0],$rider[1],$rider[2],$rider[3],$rider[4]);
  </code></pre>
  
  <p>It gives me error.. Please help me... Thank you very much for your kind help.....</p>