ajax() data, can only pass parameters as string

ajax() data, can only pass parameters as string

  1. function db_query(id)
    {
        $.ajax({   
            type: "GET",
            url: "db_handler.php",          
            data: { row_id:id, foo: "bar" },
            dataType: "html",  
            success: function(response){                   
                      // ...
            }
        });   
    }

Hey guys, what am I doing wrong here?

In my php script I receive the variables passed as strings, but I'm unable to read them when they are passed as variables.

$_GET output:

  1. Array
    (
        [foo] => bar
    )