I am getting some values (domain names) from a _POST which I have to insert into an "Array in an Array". The array is called $postValues["domainrenewals"] and the I need to create another array inside this one in the format:
domainname => 1 (where 1 is the number of years).n
My code:
foreach ($_POST['renewthesedomains'] as $key => $value) {
$postValues["domainrenewals"] = array($value => "1");
}
var_dump ($postData);
The var_dump shows that only the last $key -> $value pair is being inserted into $postValues["domainrenewals"]
Any help, much appreciated.