Good day.
There is a code that writes values into an array, but with such an organization, the array is overwritten and only the latest data is entered into it.
Question: how do I change the code for the script to work?
$input = $dom->find('input[id="reg_username"]'); $fieldname = array('login' => $input[0]->name); $input = $dom->find('input[id="reg_email"]'); $fieldname = array('email' => $input[0]->name); var_dump($fieldname);
Conclusion:
array (1) {['email'] => string (32) "some@email.ru"}
Thanks in advance!