I am having troubles replacing a value in an array. I am showing that the status is changed to 'INACTIVE' but the change doesn't seem to reflect the array that I am trying to change. Any help would be appreciated. The variable is declared within the same page and I am unsure if there is an issue with scope, but I am fairly sure that isn't the case.
Here is what I have:
foreach ($ARG_WP_Payflow_Recurring_Billing_Profiles as $key => $value){
if($value['PROFILEID'] == $_POST['DeactivateProfile']){
echo 'DING FRIES ARE DONE!<br>'.$value['STATUS'].' '.$value['PROFILEID'];
$value['STATUS'] = "INACTIVE";
echo '<br><br>'.$value['STATUS'];
echo '<pre>';
print_r ($ARG_WP_Payflow_Recurring_Billing_Profiles);
echo '</pre>';
}
This is what I get as a result when passing 'RT0000000805'
DING FRIES ARE DONE!
ACTIVE RT0000000805
INACTIVE
Array
(
[0] => Array
(
[FIRSTNAME] => John
[LASTNAME] => Doe
[ZIP] => 95101
[ACCT] => 5100
[EXPDATE] => 1215
[STATUS] => ACTIVE
[PROFILEID] => RT0000000805
)
[1] => Array
(
[FIRSTNAME] => John
[LASTNAME] => Doe
[ZIP] => 95101
[ACCT] => 5100
[EXPDATE] => 1215
[STATUS] => ACTIVE
[PROFILEID] => RT0000000806
)
[2] => Array
(
[FIRSTNAME] => John
[LASTNAME] => Doe
[ZIP] => 95101
[ACCT] => 5100
[EXPDATE] => 1215
[STATUS] => ACTIVE
[PROFILEID] => RT0000000807
)
)