#this code is supposed to construct a query string with sprintf #i'm testing my functions with count, and both returns 9 #but i get this error: #Warning: sprintf() [function.sprintf]: Too few arguments in ... echo count(getvars($columns)); echo count(c("\'%s\'", $columns)); $query = sprintf("INSERT INTO products VALUES(" . implode(",", c("\'%s\'", $columns)) . ")", getvars($columns));