I would like to dynamically create a array , I tried this way:
$zt = array();
$zt = ($p_p[0] => $_p_p[1]);
print_r($zt);
$p_p
is an array , where index 0 is the name, and index 1 is the value, 2 name, 3 value ..
$p_p
is configured like this, but unfortunately it gives error in line $zt
:
Parse error: syntax error, unexpected '= >'
If I do this:
$zt = ($p_p[0]);
It does not give error, but the index is "0", I needed it to be in fact the name, since I'm going to pass this array $zt
to POST
as if they were fields of one form.