I need to assign the attributes to the object relatively, without knowing how many parameters will come, so it is not returning results, is there another method?
var menu = document.getElementById("funcaoMenu").value;
res = menu.split(","); //divide os resultados pela "," e cria um array
oi = new Object(); // instância um novo objeto
for (var i = 0; i < res.length; i++) {
oi.i = res[i]; // recebe os dados do array e alterna a chave
};
The data I get are parameters in string, for example: "menu", "footer", "hello".
I need to run this data in a parameter in php to use the function and func_num_args and func_get_args.