Why does this yield this:
foreach( $store as $key => $value){
$value = $value.\".txt.gz\";
}
unset($value);
print_r ($store);
Array
(
[1] => 101Phon
You are rewriting the value within the loop, and not the key reference in your array.
Try
$store[$key] = $value.".txt.gz";
I believe this is what you want to do:
foreach( $store as $key => $value){
$store[$key] = $value.".txt.gz";
}
unset($value);
print_r ($store);
How about array map:
$func = function($value) { return $value . ".txt.gz"; };
print_r(array_map($func, $store));