I have an array containing a list of server names called $arPageServers
I have another array containing variables and keys passed using a form which also reflect server names, this one is called $arActive. These elements in this array have been set by user to active. I.e the checkboxes are clicked in the form.
First of all I want to set all the elements in $arPageServers to $arPageServers["active"]= false;
then, for each $Aractive as $key => $value, I want to go through the $arPageServers from the beginning to the end and search if the values in $value["name"] gives a match.
If match is true, I want to set the corresponding element in $arPageServers to $arPageServers["active"]= true;
When this is done I want to write the new file to reflect these changes.
This script just doesn't seen to work. Please help pinpointing a better way. Thanks.