Why does this yield this:
foreach( $store as $key => $value){
$value = $value.\".txt.gz\";
}
unset($value);
print_r ($store);
Array
(
[1] => 101Phon
The doc http://php.net/manual/en/control-structures.foreach.php clearly states why you have a problem:
"In order to be able to directly modify array elements within the loop precede $value with &. In that case the value will be assigned by reference."
Referencing $value is only possible if the iterated array can be referenced (i.e. if it is a variable). The following code won't work: