if inner a form I have :
foreach ($arrayquery as $a)
{ echo <input type="hidden" name="x1" value=" $a->type" >;
echo <input type="hidden" name="x2" value=" $a->color" >;
echo <input type="hidden" name="x3" value=" $a->pos" >;
}
and in:
<script type=text/javascript>
var test1=document.form.x1;
var test2=document.form.x2;
var test3=document.form.x3;
....code
</script>
now I want to use only a field hidden for all value;
I thinked some similar:
$arr=[[$a->type]=>[$a->color,$a->pos]];
<input type="hidden" name="x1[]" value="$arr" >;
the problem is here (to put array) and after
in the script javascript
is there some example online or your solution ?