a = {a = "test", id="cnbird", size = "12"} dd = "" table.foreach(a, function(i, v) dd = dd .. i .. "=" .. v .."&" end) print(dd)