Flot Chart help to obtain data from mysql, need a working example
===

I need help, Im using Flot for make a line chart, but I been trying for days and not working, I need to show in the chart info in my db, I try with this code:
this code seems to add the data from mysql, but with an incorrect format it add a " to the data, example: [1, 6], [2,3], [3, 8], [4, 5], [5, 13], [6, 8]] but the json retrive the data with the " ["1", "6"], ["2","3"], ["3", "8"], ["4", “5"], ["5", "13"], ["6", “8"]]
can someone give a working full code example, thanks you

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
     <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>Flot Examples</title>
        <link href="layout.css" rel="stylesheet" type="text/css">
        <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../excanvas.min.js"></script><![endif]-->
        <script language="javascript" type="text/javascript" src="../jquery.js"></script>
        <script language="javascript" type="text/javascript" src="../jquery.flot.js"></script>
     </head>
        <body>
        <h1>Flot Examples</h1>
    
        <div id="placeholder" style="width:600px;height:300px;"></div>
    
    <?php
    
    $server = "localhost";
        $user="user";
        $password="password";  
        $database = "some_database";
    
        $connection = mysql_connect($server,$user,$password);
        $db = mysql_select_db($database,$connection);
    
    query = "SELECT x_axis_values, y_axis_values FROM some_table";
        $result = mysql_query($query);        
    
        while($row = mysql_fetch_assoc($result))
        {
            $dataset1[] = array($row['x_axis_value'],$row['y_axis_value']);
        }
    
    ?>
    
    
    <script type="text/javascript">
    $(function () {
        var dataset1 = <?php echo json_encode($dataset1); ?>;
    
        $.plot($("#placeholder"), [ dataset1 ]);
    });
    </script>
    
     </body>
    </html>