To be safe, table2js.php uses double quotes (") for character data, and applies htmlspecialchars(), in the event of a double quote in the data. Numeric types must be unquoted, this poses a problem for NULL values, since the sequence , , is a syntax error in Javascript. Either use default values, specify NOT NULL, or the php code will have to figure out something to do with them.
Well, I figured that out in php. Simple, if you are about to write nothing, write instead 2 quotes. (the wooden pail has price=null)
The php function is contained in the file table2js.php Simply require it, and call the function with a result resource.