Encode the result set of the query as JSON? Or encode data that is being sent to the database??
$encodeable[0] is the first element of the array, so its clear that that is what will be encoded. Depending on the format of your data, encodeable[0] would be [{"key":"value"},{"key":"value"},{"key":"value"}] by default as thats an indexed array with keys of 0,1,2...
If your goal is to just output the json as a JS object {}, instead of an array [] you can use json_encode($array, JSON_FORCE_OBJECT); which will encode indexed arrays as {"0":"value"} or {"0":{"0":"value"}} instead of just ["value"] or [["value"]]. If that's not what you're after, you may just need to loop through each encodeable element of your array and encode that way (use a for loop)
http://php.net/manual/en/function.json-encode.php
[ ]brackets without parsing the data surely the JSON will become invalid?